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 private
CountingRelation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description O
get(DBIDRef id)
Get the representation of an object.SimpleTypeInformation<O>
getDataTypeInformation()
Get the data type of this representationDBIDs
getDBIDs()
Get the IDs the query is defined for.java.lang.String
getLongName()
Get a long (human readable) name for the relation.DBIDIter
iterDBIDs()
Get an iterator access to the DBIDs.int
size()
Get the number of DBIDs.
-
-
-
Method Detail
-
get
public O get(DBIDRef id)
Description copied from interface:Relation
Get the representation of an object.- Specified by:
get
in interfaceRelation<O extends NumberVector>
- Parameters:
id
- Object ID- Returns:
- object instance
-
getDataTypeInformation
public SimpleTypeInformation<O> getDataTypeInformation()
Description copied from interface:Relation
Get the data type of this representation- Specified by:
getDataTypeInformation
in interfaceRelation<O extends NumberVector>
- Returns:
- Data type
-
getDBIDs
public DBIDs getDBIDs()
Description copied from interface:Relation
Get the IDs the query is defined for.If possible, prefer
Relation.iterDBIDs()
.- Specified by:
getDBIDs
in interfaceRelation<O extends NumberVector>
- Returns:
- IDs this is defined for
-
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 interfaceRelation<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 interfaceRelation<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 interfaceRelation<O extends NumberVector>
- Returns:
- Relation name
-
-