Package elki.database.relation
Class DBIDView
- java.lang.Object
-
- elki.database.relation.DBIDView
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBID
get(DBIDRef id)
Get the representation of an object.SimpleTypeInformation<DBID>
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.void
setDBIDs(DBIDs ids)
Set the DBIDs of the view.int
size()
Get the number of DBIDs.
-
-
-
Field Detail
-
ids
private DBIDs ids
The ids object
-
-
Constructor Detail
-
DBIDView
public DBIDView(DBIDs ids)
Constructor.- Parameters:
ids
- DBIDs
-
-
Method Detail
-
get
public DBID get(DBIDRef id)
Description copied from interface:Relation
Get the representation of an object.
-
getDataTypeInformation
public SimpleTypeInformation<DBID> getDataTypeInformation()
Description copied from interface:Relation
Get the data type of this representation- Specified by:
getDataTypeInformation
in interfaceRelation<DBID>
- 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()
.
-
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 }
-
setDBIDs
public void setDBIDs(DBIDs ids)
Set the DBIDs of the view.- Parameters:
ids
- IDs to use
-
size
public int size()
Description copied from interface:Relation
Get the number of DBIDs.
-
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<DBID>
- Returns:
- Relation name
-
-