O
- Data typepublic class MaterializedRelation<O> extends AbstractRelation<O> implements ModifiableRelation<O>
Modifier and Type | Field and Description |
---|---|
private DataStore<O> |
content
Map to hold the objects of the database.
|
private StaticDBIDs |
ids
The DBIDs this is supposed to be defined for.
|
private static Logging |
LOG
Class logger.
|
private java.lang.String |
name
The relation name.
|
private java.lang.String |
shortname
The relation name (short version)
|
private SimpleTypeInformation<O> |
type
The class of objects we store.
|
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
MaterializedRelation(SimpleTypeInformation<O> type,
DBIDs ids)
Constructor.
|
MaterializedRelation(SimpleTypeInformation<O> type,
DBIDs ids,
java.lang.String name)
Constructor.
|
MaterializedRelation(SimpleTypeInformation<O> type,
DBIDs ids,
java.lang.String name,
DataStore<O> content)
Constructor.
|
MaterializedRelation(java.lang.String name,
java.lang.String shortname,
SimpleTypeInformation<O> type,
DataStore<O> content,
DBIDs ids)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(DBIDRef id)
Delete an objects values.
|
O |
get(DBIDRef id)
Get the representation of an object.
|
SimpleTypeInformation<O> |
getDataTypeInformation()
Get the data type of this representation
|
StaticDBIDs |
getDBIDs()
Get the IDs the query is defined for.
|
protected Logging |
getLogger()
Get the class logger.
|
java.lang.String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
java.lang.String |
getShortName()
A short name for the result, useful for file names.
|
void |
insert(DBIDRef id,
O val)
Set (or insert) an object representation.
|
DBIDIter |
iterDBIDs()
Get an iterator access to the DBIDs.
|
int |
size()
Get the number of DBIDs.
|
getDistanceQuery, getKNNQuery, getRangeQuery, getRKNNQuery, getSimilarityQuery, getSimilarityRangeQuery
addChildResult, getHierarchy, setHierarchy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, getDistanceQuery, getKNNQuery, getKNNQuery, getRangeQuery, getRangeQuery, getRKNNQuery, getRKNNQuery, getSimilarityQuery, getSimilarityRangeQuery, getSimilarityRangeQuery
getHierarchy, setHierarchy
private static final Logging LOG
private final SimpleTypeInformation<O> type
private final StaticDBIDs ids
private java.lang.String name
private java.lang.String shortname
public MaterializedRelation(SimpleTypeInformation<O> type, DBIDs ids)
type
- Type informationids
- IDspublic MaterializedRelation(SimpleTypeInformation<O> type, DBIDs ids, java.lang.String name)
type
- Type informationids
- IDsname
- Namepublic MaterializedRelation(SimpleTypeInformation<O> type, DBIDs ids, java.lang.String name, DataStore<O> content)
type
- Type informationids
- IDsname
- Namecontent
- Contentpublic MaterializedRelation(java.lang.String name, java.lang.String shortname, SimpleTypeInformation<O> type, DataStore<O> content, DBIDs ids)
name
- Nameshortname
- Short name of the resulttype
- Type informationcontent
- Contentids
- IDspublic O get(DBIDRef id)
Relation
public void insert(DBIDRef id, O val)
ModifiableRelation
insert
in interface ModifiableRelation<O>
id
- Object IDval
- Valuepublic void delete(DBIDRef id)
delete
in interface ModifiableRelation<O>
id
- ID to deletepublic StaticDBIDs getDBIDs()
Relation
Relation.iterDBIDs()
.public DBIDIter iterDBIDs()
Relation
for(DBIDIter iter = relation.iterDBIDs(); iter.valid(); iter.advance()) {
relation.get(iter); // Get the current element
}
public int size()
Relation
public SimpleTypeInformation<O> getDataTypeInformation()
Relation
getDataTypeInformation
in interface Relation<O>
public java.lang.String getLongName()
Result
getLongName
in interface Result
public java.lang.String getShortName()
Result
getShortName
in interface Result
protected Logging getLogger()
AbstractRelation
getLogger
in class AbstractRelation<O>
Copyright © 2019 ELKI Development Team. License information.