Package elki.index.tree.spatial.kd
Class MemoryKDTree.CountingRelation
- java.lang.Object
-
- elki.index.tree.spatial.kd.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 Summary
Constructors Modifier Constructor Description privateCountingRelation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Oget(DBIDRef id)Get the representation of an object.SimpleTypeInformation<O>getDataTypeInformation()Get the data type of this representationDBIDsgetDBIDs()Get the IDs the query is defined for.java.lang.StringgetLongName()Get a long (human readable) name for the relation.DBIDIteriterDBIDs()Get an iterator access to the DBIDs.intsize()Get the number of DBIDs.
-
-
-
Method Detail
-
get
public O get(DBIDRef id)
Description copied from interface:RelationGet the representation of an object.- Specified by:
getin interfaceRelation<O extends NumberVector>- Parameters:
id- Object ID- Returns:
- object instance
-
getDataTypeInformation
public SimpleTypeInformation<O> getDataTypeInformation()
Description copied from interface:RelationGet the data type of this representation- Specified by:
getDataTypeInformationin interfaceRelation<O extends NumberVector>- Returns:
- Data type
-
getDBIDs
public DBIDs getDBIDs()
Description copied from interface:RelationGet the IDs the query is defined for.If possible, prefer
Relation.iterDBIDs().- Specified by:
getDBIDsin interfaceRelation<O extends NumberVector>- Returns:
- IDs this is defined for
-
iterDBIDs
public DBIDIter iterDBIDs()
Description copied from interface:RelationGet 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:
iterDBIDsin interfaceRelation<O extends NumberVector>- Returns:
- iterator for the DBIDs.
-
size
public int size()
Description copied from interface:RelationGet the number of DBIDs.- Specified by:
sizein interfaceRelation<O extends NumberVector>- Returns:
- Size
-
getLongName
public java.lang.String getLongName()
Description copied from interface:RelationGet a long (human readable) name for the relation.- Specified by:
getLongNamein interfaceRelation<O extends NumberVector>- Returns:
- Relation name
-
-