|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.result.AbstractHierarchicalResult de.lmu.ifi.dbs.elki.database.relation.MaterializedRelation<O>
O
- Data typepublic class MaterializedRelation<O>
Represents a single representation. This is attached to a DBIDs object, which you are supposed to manage first. I.e. put the new DBID in, then invoke set(), remove the DBID, then delete(). TODO: is this semantic sane?
Field Summary | |
---|---|
private DataStore<O> |
content
Map to hold the objects of the database. |
private Database |
database
Our database |
private StaticDBIDs |
ids
The DBIDs this is supposed to be defined for. |
private String |
name
The relation name. |
private String |
shortname
The relation name (short version) |
private SimpleTypeInformation<O> |
type
The class of objects we store. |
Fields inherited from interface de.lmu.ifi.dbs.elki.database.query.DatabaseQuery |
---|
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE |
Constructor Summary | |
---|---|
MaterializedRelation(Database database,
SimpleTypeInformation<O> type,
DBIDs ids)
Constructor. |
|
MaterializedRelation(Database database,
SimpleTypeInformation<O> type,
DBIDs ids,
String name)
Constructor. |
|
MaterializedRelation(Database database,
SimpleTypeInformation<O> type,
DBIDs ids,
String name,
DataStore<O> content)
Constructor. |
|
MaterializedRelation(String name,
String shortname,
SimpleTypeInformation<O> type,
DataStore<O> content,
DBIDs ids)
Constructor. |
Method Summary | |
---|---|
void |
delete(DBID id)
Delete an objects values. |
O |
get(DBID id)
Get the representation of an object. |
Database |
getDatabase()
Get the associated database. |
SimpleTypeInformation<O> |
getDataTypeInformation()
Get the data type of this representation |
StaticDBIDs |
getDBIDs()
Get the IDs the query is defined for. |
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus. |
String |
getShortName()
A short name for the result, useful for file names. |
IterableIterator<DBID> |
iterDBIDs()
Get an iterator access to the DBIDs. |
void |
set(DBID id,
O val)
Set an object representation. |
int |
size()
Get the number of DBIDs. |
Methods inherited from class de.lmu.ifi.dbs.elki.result.AbstractHierarchicalResult |
---|
addChildResult, getHierarchy, setHierarchy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.result.HierarchicalResult |
---|
getHierarchy, setHierarchy |
Field Detail |
---|
private final Database database
private final SimpleTypeInformation<O> type
private final DataStore<O> content
private final StaticDBIDs ids
private String name
private String shortname
Constructor Detail |
---|
public MaterializedRelation(Database database, SimpleTypeInformation<O> type, DBIDs ids)
database
- Databasetype
- Type informationids
- IDspublic MaterializedRelation(Database database, SimpleTypeInformation<O> type, DBIDs ids, String name)
database
- Databasetype
- Type informationids
- IDsname
- Namepublic MaterializedRelation(Database database, SimpleTypeInformation<O> type, DBIDs ids, String name, DataStore<O> content)
database
- Databasetype
- Type informationids
- IDsname
- Namecontent
- Contentpublic MaterializedRelation(String name, String shortname, SimpleTypeInformation<O> type, DataStore<O> content, DBIDs ids)
name
- Nameshortname
- Short name of the resulttype
- Type informationcontent
- Contentids
- IDsMethod Detail |
---|
public Database getDatabase()
Relation
null
!
getDatabase
in interface Relation<O>
public O get(DBID id)
Relation
get
in interface Relation<O>
id
- Object ID
public void set(DBID id, O val)
Relation
set
in interface Relation<O>
id
- Object IDval
- Valuepublic void delete(DBID id)
delete
in interface Relation<O>
id
- ID to deletepublic StaticDBIDs getDBIDs()
Relation
getDBIDs
in interface Relation<O>
public IterableIterator<DBID> iterDBIDs()
Relation
iterDBIDs
in interface Relation<O>
public int size()
Relation
size
in interface Relation<O>
public SimpleTypeInformation<O> getDataTypeInformation()
Relation
getDataTypeInformation
in interface Relation<O>
public String getLongName()
Result
getLongName
in interface Result
public String getShortName()
Result
getShortName
in interface Result
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |