Class ProxyView<O>

  • Type Parameters:
    O - Object type
    All Implemented Interfaces:
    elki.database.relation.Relation<O>

    public class ProxyView<O>
    extends java.lang.Object
    implements elki.database.relation.Relation<O>
    A virtual partitioning of the database. For the accepted DBIDs, access is passed on to the wrapped representation.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private elki.database.ids.DBIDs idview
      The DBIDs we contain
      private elki.database.relation.Relation<O> inner
      The wrapped representation where we get the IDs from.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyView​(elki.database.ids.DBIDs idview, elki.database.relation.Relation<O> inner)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      O get​(elki.database.ids.DBIDRef id)  
      elki.data.type.SimpleTypeInformation<O> getDataTypeInformation()  
      elki.database.ids.DBIDs getDBIDs()  
      java.lang.String getLongName()  
      elki.database.ids.DBIDIter iterDBIDs()  
      void setDBIDs​(elki.database.ids.DBIDs ids)
      Set the DBIDs to use.
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface elki.database.relation.Relation

        forEach
    • Field Detail

      • idview

        private elki.database.ids.DBIDs idview
        The DBIDs we contain
      • inner

        private final elki.database.relation.Relation<O> inner
        The wrapped representation where we get the IDs from.
    • Constructor Detail

      • ProxyView

        public ProxyView​(elki.database.ids.DBIDs idview,
                         elki.database.relation.Relation<O> inner)
        Constructor.
        Parameters:
        idview - Ids to expose
        inner - Inner representation
    • Method Detail

      • get

        public O get​(elki.database.ids.DBIDRef id)
        Specified by:
        get in interface elki.database.relation.Relation<O>
      • getDBIDs

        public elki.database.ids.DBIDs getDBIDs()
        Specified by:
        getDBIDs in interface elki.database.relation.Relation<O>
      • iterDBIDs

        public elki.database.ids.DBIDIter iterDBIDs()
        Specified by:
        iterDBIDs in interface elki.database.relation.Relation<O>
      • size

        public int size()
        Specified by:
        size in interface elki.database.relation.Relation<O>
      • getDataTypeInformation

        public elki.data.type.SimpleTypeInformation<O> getDataTypeInformation()
        Specified by:
        getDataTypeInformation in interface elki.database.relation.Relation<O>
      • getLongName

        public java.lang.String getLongName()
        Specified by:
        getLongName in interface elki.database.relation.Relation<O>
      • setDBIDs

        public void setDBIDs​(elki.database.ids.DBIDs ids)
        Set the DBIDs to use.
        Parameters:
        ids - DBIDs