|
|
|||||||||||||||||||||
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.SequentialDatabase<O>
O
- the type of FeatureVector as element of the databasepublic class SequentialDatabase<O extends DatabaseObject>
SequentialDatabase is a simple implementation of a Database.
It does not support any index structure and holds all objects in main memory (as a Map).
Field Summary |
---|
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, logger |
Constructor Summary | |
---|---|
SequentialDatabase()
Provides a database for main memory holding all objects in a hashtable. |
Method Summary | ||
---|---|---|
|
bulkKNNQueryForID(List<Integer> ids,
int k,
DistanceFunction<O,D> distanceFunction)
Retrieves the k nearest neighbors for the query objects. |
|
|
kNNQueryForID(Integer id,
int k,
DistanceFunction<O,D> distanceFunction)
Retrieves the k nearest neighbors for the query object. |
|
|
kNNQueryForObject(O queryObject,
int k,
DistanceFunction<O,D> distanceFunction)
Retrieves the k nearest neighbors for the query 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 |
shortDescription()
Provides a description for SequentialDatabase. |
Methods inherited from class de.lmu.ifi.dbs.elki.database.AbstractDatabase |
---|
addDatabaseListener, associate, associateGlobally, delete, delete, deleteAssociations, dimensionality, fireObjectInserted, fireObjectRemoved, fireObjectsChanged, fireObjectsInserted, fireObjectsRemoved, get, getAssociation, getAssociations, getGlobalAssociation, getIDs, getObjects, insert, insert, 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, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, setParameters |
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.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters, setParameters |
Constructor Detail |
---|
public SequentialDatabase()
Method Detail |
---|
public <D extends Distance<D>> List<DistanceResultPair<D>> kNNQueryForObject(O queryObject, int k, DistanceFunction<O,D> distanceFunction)
KNNList
, see KNNList.add(DistanceResultPair)
.
D
- distance typequeryObject
- the query objectk
- the number of nearest neighbors to be returneddistanceFunction
- the distance function that computes the distances between the
objects
Database.kNNQueryForObject(DatabaseObject, int, DistanceFunction)
public <D extends Distance<D>> List<DistanceResultPair<D>> kNNQueryForID(Integer id, int k, DistanceFunction<O,D> distanceFunction)
KNNList
, see KNNList.add(DistanceResultPair)
.
D
- distance typeid
- the ID of the query objectk
- the number of nearest neighbors to be returneddistanceFunction
- the distance function that computes the distances between the
objects
Database.kNNQueryForObject(DatabaseObject, int, DistanceFunction)
public <D extends Distance<D>> List<List<DistanceResultPair<D>>> bulkKNNQueryForID(List<Integer> ids, int k, DistanceFunction<O,D> distanceFunction)
KNNList
, see KNNList.add(DistanceResultPair)
.
D
- distance typeids
- the IDs of the query objectsk
- the number of nearest neighbors to be returneddistanceFunction
- the distance function that computes the distances between the
objects
Database.kNNQueryForObject(DatabaseObject, int, DistanceFunction)
public <D extends Distance<D>> List<DistanceResultPair<D>> rangeQuery(Integer id, String epsilon, DistanceFunction<O,D> distanceFunction)
Database
Performs a range query for the given object ID with the given epsilon range and the according distance function.
The query result is sorted in ascending order w.r.t. the distance to the query object.
D
- distance typeid
- the ID of the query objectepsilon
- the string representation of the query rangedistanceFunction
- the distance function that computes the distances between the
objects
public <D extends Distance<D>> List<DistanceResultPair<D>> reverseKNNQuery(Integer id, int k, DistanceFunction<O,D> distanceFunction)
Database
Performs a reverse k-nearest neighbor query for the given object ID.
The query result is sorted in ascending order w.r.t. the distance to the query object.
Generally, it is assumed that the database does not contain less than k objects.
D
- distance typeid
- the ID of the query objectk
- the size of k-nearest neighborhood of any database object o
to contain a database object in order to include o
in the result listdistanceFunction
- the distance function that computes the distances between the
objects
public String shortDescription()
shortDescription
in interface Parameterizable
shortDescription
in class AbstractParameterizable
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |