Class MemoryKDTree.CountingRelation

  • All Implemented Interfaces:
    Relation<O>
    Enclosing class:
    MemoryKDTree<O extends NumberVector>

    private class MemoryKDTree.CountingRelation
    extends java.lang.Object
    implements Relation<O>
    Proxy to count accesses.
    Author:
    Erich Schubert
    • Constructor Detail

      • CountingRelation

        private CountingRelation()
    • Method Detail

      • get

        public O get​(DBIDRef id)
        Description copied from interface: Relation
        Get the representation of an object.
        Specified by:
        get in interface Relation<O extends NumberVector>
        Parameters:
        id - Object ID
        Returns:
        object instance
      • iterDBIDs

        public DBIDIter iterDBIDs()
        Description copied from interface: Relation
        Get an iterator access to the DBIDs.

        To iterate over all IDs, use the following code fragment:

         
         for(DBIDIter iter = relation.iterDBIDs(); iter.valid(); iter.advance()) {
            relation.get(iter); // Get the current element
         }
         
         
        Specified by:
        iterDBIDs in interface Relation<O extends NumberVector>
        Returns:
        iterator for the DBIDs.
      • size

        public int size()
        Description copied from interface: Relation
        Get the number of DBIDs.
        Specified by:
        size in interface Relation<O extends NumberVector>
        Returns:
        Size
      • getLongName

        public java.lang.String getLongName()
        Description copied from interface: Relation
        Get a long (human readable) name for the relation.
        Specified by:
        getLongName in interface Relation<O extends NumberVector>
        Returns:
        Relation name