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 DBIDget(DBIDRef id)Get the representation of an object.SimpleTypeInformation<DBID>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.voidsetDBIDs(DBIDs ids)Set the DBIDs of the view.intsize()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:RelationGet the representation of an object.
-
getDataTypeInformation
public SimpleTypeInformation<DBID> getDataTypeInformation()
Description copied from interface:RelationGet the data type of this representation- Specified by:
getDataTypeInformationin interfaceRelation<DBID>- Returns:
- Data type
-
getDBIDs
public DBIDs getDBIDs()
Description copied from interface:RelationGet the IDs the query is defined for.If possible, prefer
Relation.iterDBIDs().
-
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 }
-
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:RelationGet the number of DBIDs.
-
getLongName
public java.lang.String getLongName()
Description copied from interface:RelationGet a long (human readable) name for the relation.- Specified by:
getLongNamein interfaceRelation<DBID>- Returns:
- Relation name
-
-