|
|
|||||||||||||||||||||
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.index.tree.TreeIndex<O,N,E>
de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialIndex<O,N,E>
O
- Vector typeN
- Node typeE
- Entry typepublic abstract class SpatialIndex<O extends NumberVector<O,?>,N extends SpatialNode<N,E>,E extends SpatialEntry>
Abstract super class for all spatial index classes.
Field Summary | |
---|---|
protected boolean |
bulk
If true, a bulk load will be performed. |
private Flag |
BULK_LOAD_FLAG
Parameter for bulk loading |
static OptionID |
BULK_LOAD_ID
OptionID for BULK_LOAD_FLAG |
static OptionID |
BULK_LOAD_STRATEGY_ID
OptionID for BULK_LOAD_STRATEGY_PARAM |
private PatternParameter |
BULK_LOAD_STRATEGY_PARAM
Parameter for bulk strategy |
protected BulkSplit.Strategy |
bulkLoadStrategy
The strategy for bulk load. |
Fields inherited from class de.lmu.ifi.dbs.elki.index.tree.TreeIndex |
---|
CACHE_SIZE_ID, cacheSize, dirCapacity, dirMinimum, file, FILE_ID, initialized, leafCapacity, leafMinimum, PAGE_SIZE_ID, pageSize |
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, logger |
Constructor Summary | |
---|---|
SpatialIndex()
Index constructor. |
Method Summary | ||
---|---|---|
abstract
|
bulkKNNQueryForIDs(List<Integer> ids,
int k,
SpatialDistanceFunction<O,D> distanceFunction)
Performs a bulk k-nearest neighbor query for the given object IDs. |
|
abstract List<E> |
getLeaves()
Returns a list of entries pointing to the leaf nodes of this spatial index. |
|
abstract
|
kNNQuery(O obj,
int k,
SpatialDistanceFunction<O,D> distanceFunction)
Performs a k-nearest neighbor query for the given object with the given parameter k and the according distance function. |
|
abstract
|
rangeQuery(O obj,
String epsilon,
SpatialDistanceFunction<O,D> distanceFunction)
Performs a range query for the given object with the given epsilon range and the according distance function. |
|
abstract
|
reverseKNNQuery(O object,
int k,
SpatialDistanceFunction<O,D> distanceFunction)
Performs a reverse k-nearest neighbor query for the given object ID. |
|
void |
setDatabase(Database<O> database)
Sets the database in the distance function of this index (if existing). |
|
List<String> |
setParameters(List<String> args)
todo |
Methods inherited from class de.lmu.ifi.dbs.elki.index.tree.TreeIndex |
---|
close, createEmptyRoot, createHeader, createNewDirectoryNode, createNewLeafNode, createRootEntry, getLogicalPageAccess, getNode, getNode, getPhysicalReadAccess, getPhysicalWriteAccess, getRoot, getRootEntry, getRootPath, initialize, initializeCapacities, initializeFromFile, postDelete, preInsert, resetPageAccess |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
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.index.Index |
---|
delete, insert, insert |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription |
Field Detail |
---|
public static final OptionID BULK_LOAD_ID
BULK_LOAD_FLAG
private final Flag BULK_LOAD_FLAG
public static final OptionID BULK_LOAD_STRATEGY_ID
BULK_LOAD_STRATEGY_PARAM
private final PatternParameter BULK_LOAD_STRATEGY_PARAM
protected boolean bulk
protected BulkSplit.Strategy bulkLoadStrategy
Constructor Detail |
---|
public SpatialIndex()
Method Detail |
---|
public List<String> setParameters(List<String> args) throws ParameterException
setParameters
in interface Parameterizable
setParameters
in class TreeIndex<O extends NumberVector<O,?>,N extends SpatialNode<N,E>,E extends SpatialEntry>
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-settingpublic void setDatabase(Database<O> database)
database
- the databasepublic abstract <D extends Distance<D>> List<DistanceResultPair<D>> rangeQuery(O obj, String epsilon, SpatialDistanceFunction<O,D> distanceFunction)
D
- distance typeobj
- the query objectepsilon
- the string representation of the query rangedistanceFunction
- the distance function that computes the distances
between the objects
public abstract <D extends Distance<D>> List<DistanceResultPair<D>> kNNQuery(O obj, int k, SpatialDistanceFunction<O,D> distanceFunction)
D
- distance typeobj
- the query objectk
- the number of nearest neighbors to be returneddistanceFunction
- the distance function that computes the distances
between the objects
public abstract <D extends Distance<D>> List<DistanceResultPair<D>> reverseKNNQuery(O object, int k, SpatialDistanceFunction<O,D> distanceFunction)
D
- distance typeobject
- the query objectk
- the number of nearest neighbors to be returneddistanceFunction
- the distance function that computes the distances
between the objects
public abstract <D extends Distance<D>> List<List<DistanceResultPair<D>>> bulkKNNQueryForIDs(List<Integer> ids, int k, SpatialDistanceFunction<O,D> distanceFunction)
D
- distance typeids
- the query objectsk
- the number of nearest neighbors to be returneddistanceFunction
- the distance function that computes the distances
between the objects
public abstract List<E> getLeaves()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |