Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.index
Interface Index<O extends DatabaseObject>

Type Parameters:
O - the type of DatabaseObject to be stored in the index
All Superinterfaces:
Parameterizable
All Known Implementing Classes:
AbstractMkTree, AbstractMTree, AbstractRStarTree, DeLiCluTree, MetricalIndex, MkAppTree, MkCoPTree, MkMaxTree, MkTabTree, MTree, NonFlatRStarTree, RdKNNTree, RStarTree, SpatialIndex, TreeIndex

public interface Index<O extends DatabaseObject>
extends Parameterizable

Interface defining the minimum requirements for all index classes.

Author:
Elke Achtert

Method Summary
 void close()
          Closes this index.
 boolean delete(O object)
          Deletes the specified object from this index.
 long getLogicalPageAccess()
          Returns the logical page access of this index.
 long getPhysicalReadAccess()
          Returns the physical read access of this index.
 long getPhysicalWriteAccess()
          Returns the physical write access of this index.
 void insert(List<O> objects)
          Inserts the specified objects into this index.
 void insert(O object)
          Inserts the specified object into this index.
 void resetPageAccess()
          Resets the three counters for page access, i.e., the counters for physical read and write access, and the counter for logical page access.
 void setDatabase(Database<O> database)
          Sets the database in the distance function of this index (if existing).
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, collectOptions, getParameters, setParameters, shortDescription
 

Method Detail

getPhysicalReadAccess

long getPhysicalReadAccess()
Returns the physical read access of this index.

Returns:
the number of pages read from hard disk since the last call of resetPageAccess.

getPhysicalWriteAccess

long getPhysicalWriteAccess()
Returns the physical write access of this index.

Returns:
the number of pages written to hard disk since the last call of resetPageAccess.

getLogicalPageAccess

long getLogicalPageAccess()
Returns the logical page access of this index.

Returns:
the overall number of pages accesses (including e.g. cache operations like put or remove) since the last call of resetPageAccess.

resetPageAccess

void resetPageAccess()
Resets the three counters for page access, i.e., the counters for physical read and write access, and the counter for logical page access.


close

void close()
Closes this index.


insert

void insert(O object)
Inserts the specified object into this index.

Parameters:
object - the vector to be inserted

insert

void insert(List<O> objects)
Inserts the specified objects into this index. If a bulk load mode is implemented, the objects are inserted in one bulk.

Parameters:
objects - the objects to be inserted

delete

boolean delete(O object)
Deletes the specified object from this index.

Parameters:
object - the object to be deleted
Returns:
true if this index did contain the object, false otherwise

setDatabase

void setDatabase(Database<O> database)
Sets the database in the distance function of this index (if existing).

Parameters:
database - the database

Release 0.2 (2009-07-06_1820)