de.lmu.ifi.dbs.elki.index
Class AbstractIndex<O>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.AbstractIndex<O>
Type Parameters:
O - Object type stored in the index
All Implemented Interfaces:
Index, Result
Direct Known Subclasses:
AbstractPreprocessorIndex

public abstract class AbstractIndex<O>
extends Object
implements Index

Abstract base class for indexes with some implementation defaults.


Field Summary
protected  Relation<O> relation
          The representation we are bound to.
 
Constructor Summary
AbstractIndex(Relation<O> relation)
          Constructor.
 
Method Summary
 boolean delete(DBID id)
          Deletes the specified object from this index.
 void deleteAll(DBIDs id)
          Deletes the specified objects from this index.
abstract  String getLongName()
          A "pretty" name for the result, for use in titles, captions and menus.
 PageFileStatistics getPageFileStatistics()
          Get the underlying page file (or a proxy), for access counts.
abstract  String getShortName()
          A short name for the result, useful for file names.
 void insert(DBID id)
          Inserts the specified object into this index.
 void insertAll(DBIDs ids)
          Inserts the specified objects into this index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

relation

protected final Relation<O> relation
The representation we are bound to.

Constructor Detail

AbstractIndex

public AbstractIndex(Relation<O> relation)
Constructor.

Parameters:
relation - Relation indexed
Method Detail

getLongName

public abstract String getLongName()
Description copied from interface: Result
A "pretty" name for the result, for use in titles, captions and menus.

Specified by:
getLongName in interface Result
Returns:
result name

getShortName

public abstract String getShortName()
Description copied from interface: Result
A short name for the result, useful for file names.

Specified by:
getShortName in interface Result
Returns:
result name

getPageFileStatistics

public PageFileStatistics getPageFileStatistics()
Description copied from interface: Index
Get the underlying page file (or a proxy), for access counts.

Specified by:
getPageFileStatistics in interface Index
Returns:
page file

insert

public void insert(DBID id)
Description copied from interface: Index
Inserts the specified object into this index.

Specified by:
insert in interface Index
Parameters:
id - the object to be inserted

insertAll

public void insertAll(DBIDs ids)
Description copied from interface: Index
Inserts the specified objects into this index. If a bulk load mode is implemented, the objects are inserted in one bulk.

Specified by:
insertAll in interface Index
Parameters:
ids - the objects to be inserted

delete

public boolean delete(DBID id)
Description copied from interface: Index
Deletes the specified object from this index.

Specified by:
delete in interface Index
Parameters:
id - Object to remove
Returns:
true if this index did contain the object, false otherwise

deleteAll

public void deleteAll(DBIDs id)
Description copied from interface: Index
Deletes the specified objects from this index.

Specified by:
deleteAll in interface Index
Parameters:
id - Objects to remove

Release 0.4.0 (2011-09-20_1324)