|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.database.AbstractDatabase<O>
de.lmu.ifi.dbs.elki.database.IndexDatabase<O>
de.lmu.ifi.dbs.elki.database.SpatialIndexDatabase<O,N,E>
public class SpatialIndexDatabase<O extends NumberVector<O,?>,N extends SpatialNode<N,E>,E extends SpatialEntry>
SpatialIndexDatabase is a database implementation which is supported by a spatial index structure.
| Field Summary | |
|---|---|
protected SpatialIndex<O,N,E> |
index
The index structure storing the data. |
static OptionID |
INDEX_ID
OptionID for INDEX_PARAM |
private ClassParameter<SpatialIndex> |
INDEX_PARAM
Parameter to specify the spatial index to use. |
| Fields inherited from class de.lmu.ifi.dbs.elki.database.AbstractDatabase |
|---|
listenerList |
| Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
|---|
optionHandler |
| Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debug |
| Constructor Summary | |
|---|---|
SpatialIndexDatabase()
|
|
| Method Summary | ||
|---|---|---|
|
bulkKNNQueryForID(List<Integer> ids,
int k,
DistanceFunction<O,D> distanceFunction)
Performs k-nearest neighbor queries for the given object IDs. |
|
String |
description()
Returns a short description of the database. |
|
SpatialIndex<O,N,E> |
getIndex()
Returns the index of this database. |
|
List<E> |
getLeaves()
Returns a list of the leaf nodes of the underlying spatial index of this database. |
|
E |
getRootEntry()
Returns the id of the root of the underlying index. |
|
void |
insert(List<ObjectAndAssociations<O>> objectsAndAssociationsList)
Calls the super method and afterwards inserts the specified objects into the underlying index structure. |
|
Integer |
insert(ObjectAndAssociations<O> objectAndAssociations)
Calls the super method and afterwards inserts the specified object into the underlying index structure. |
|
|
kNNQueryForID(Integer id,
int k,
DistanceFunction<O,D> distanceFunction)
Performs a k-nearest neighbor query for the given object ID. |
|
|
kNNQueryForObject(O queryObject,
int k,
DistanceFunction<O,D> distanceFunction)
Performs a k-nearest neighbor query for the given object. |
|
|
rangeQuery(Integer id,
String epsilon,
DistanceFunction<O,D> distanceFunction)
Performs a range query for the given object ID with the given epsilon range and the according distance function. |
|
|
reverseKNNQuery(Integer id,
int k,
DistanceFunction<O,D> distanceFunction)
Performs a reverse k-nearest neighbor query for the given object ID. |
|
String[] |
setParameters(String[] args)
Sets the values for the parameter bulk. |
|
String |
toString()
Returns a string representation of this database. |
|
| Methods inherited from class de.lmu.ifi.dbs.elki.database.IndexDatabase |
|---|
delete, delete, getLogicalPageAccess, getPhysicalReadAccess, getPhysicalWriteReadAccess, resetPageAccess |
| Methods inherited from class de.lmu.ifi.dbs.elki.database.AbstractDatabase |
|---|
addDatabaseListener, associate, associateGlobally, deleteAssociations, dimensionality, fireObjectInserted, fireObjectRemoved, fireObjectsChanged, fireObjectsInserted, fireObjectsRemoved, get, getAssociation, getAssociations, getGlobalAssociation, getIDs, getObjects, isSet, isSetForAllObjects, isSetGlobally, iterator, partition, partition, randomSample, removeDatabaseListener, restoreID, setAssociations, setNewID, size |
| Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
|---|
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters |
| Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
|---|
checkGlobalParameterConstraints, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription |
| Field Detail |
|---|
public static final OptionID INDEX_ID
INDEX_PARAM
private final ClassParameter<SpatialIndex> INDEX_PARAM
Key: -spatialindexdb.index
protected SpatialIndex<O extends NumberVector<O,?>,N extends SpatialNode<N,E>,E extends SpatialEntry> index
| Constructor Detail |
|---|
public SpatialIndexDatabase()
| Method Detail |
|---|
public Integer insert(ObjectAndAssociations<O> objectAndAssociations)
throws UnableToComplyException
insert in interface Database<O extends NumberVector<O,?>>insert in class AbstractDatabase<O extends NumberVector<O,?>>objectAndAssociations - the object and its associations to be inserted
UnableToComplyException - if database reached limit of storage capacityDatabase.insert(ObjectAndAssociations)
public void insert(List<ObjectAndAssociations<O>> objectsAndAssociationsList)
throws UnableToComplyException
insert in interface Database<O extends NumberVector<O,?>>insert in class AbstractDatabase<O extends NumberVector<O,?>>objectsAndAssociationsList - the list of objects and their associations to be inserted
UnableToComplyException - if initialization is not possibleDatabase.insert(java.util.List)
public <D extends Distance<D>> List<QueryResult<D>> rangeQuery(Integer id,
String epsilon,
DistanceFunction<O,D> distanceFunction)
Database
id - the ID of the query objectepsilon - the string representation of the query rangedistanceFunction - the distance function that computes the distances beween the
objects
Database.rangeQuery(Integer,String,de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction)
public <D extends Distance<D>> List<QueryResult<D>> kNNQueryForObject(O queryObject,
int k,
DistanceFunction<O,D> distanceFunction)
Database
queryObject - the query objectk - the number of nearest neighbors to be returneddistanceFunction - the distance function that computes the distances beween the
objects
Database.kNNQueryForObject(de.lmu.ifi.dbs.elki.data.DatabaseObject,int,de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction)
public <D extends Distance<D>> List<QueryResult<D>> kNNQueryForID(Integer id,
int k,
DistanceFunction<O,D> distanceFunction)
Database
id - the ID of the query objectk - the number of nearest neighbors to be returneddistanceFunction - the distance function that computes the distances beween the
objects
Database.kNNQueryForID(Integer,int,de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction)
public <D extends Distance<D>> List<List<QueryResult<D>>> bulkKNNQueryForID(List<Integer> ids,
int k,
DistanceFunction<O,D> distanceFunction)
Database
ids - the IDs of the query objectsk - the number of nearest neighbors to be returneddistanceFunction - the distance function that computes the distances beween the
objects
Database.bulkKNNQueryForID(java.util.List,int,de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction)
public <D extends Distance<D>> List<QueryResult<D>> reverseKNNQuery(Integer id,
int k,
DistanceFunction<O,D> distanceFunction)
id - the ID of the query objectk - the number of nearest neighbors to be returneddistanceFunction - the distance function that computes the distances beween the
objects
public String toString()
toString in class Object
public String[] setParameters(String[] args)
throws ParameterException
setParameters in interface ParameterizablesetParameters in class AbstractParameterizableargs - parameters to set the attributes accordingly to
ParameterException - in case of wrong parameter-settingParameterizable.setParameters(String[])public List<E> getLeaves()
public E getRootEntry()
public SpatialIndex<O,N,E> getIndex()
getIndex in class IndexDatabase<O extends NumberVector<O,?>>public String description()
description in interface Database<O extends NumberVector<O,?>>description in interface Parameterizabledescription in class AbstractParameterizableParameterizable.description()
|
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||