de.lmu.ifi.dbs.elki.index.preprocessed.knn
Class PartitionApproximationMaterializeKNNPreprocessor<O,D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.index.AbstractIndex<O>
de.lmu.ifi.dbs.elki.index.preprocessed.AbstractPreprocessorIndex<O,List<DistanceResultPair<D>>>
de.lmu.ifi.dbs.elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor<O,D>
de.lmu.ifi.dbs.elki.index.preprocessed.knn.PartitionApproximationMaterializeKNNPreprocessor<O,D>
- Type Parameters:
O - the type of database objects the preprocessor can be applied toD - the type of distance the used distance function will return
- All Implemented Interfaces:
- Index, KNNIndex<O>, Result
@Title(value="Partitioning Approximate kNN Preprocessor")
@Description(value="Caterializes the (approximate) k nearest neighbors of objects of a database by partitioning and only computing kNN within each partition.")
public class PartitionApproximationMaterializeKNNPreprocessor<O,D extends Distance<D>>
- extends AbstractMaterializeKNNPreprocessor<O,D>
A preprocessor for annotation of the k nearest neighbors (and their
distances) to each database object.
Used for example by LOF.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final Logging logger
- Logger to use
partitions
private final int partitions
- Number of partitions to use.
PartitionApproximationMaterializeKNNPreprocessor
public PartitionApproximationMaterializeKNNPreprocessor(Relation<O> relation,
DistanceFunction<? super O,D> distanceFunction,
int k,
int partitions)
- Constructor
- Parameters:
relation - Relation to processdistanceFunction - the distance function to usek - query kpartitions - Number of partitions
preprocess
protected void preprocess()
- Description copied from class:
AbstractMaterializeKNNPreprocessor
- Perform the preprocessing step.
- Specified by:
preprocess in class AbstractMaterializeKNNPreprocessor<O,D extends Distance<D>>
getLogger
protected Logging getLogger()
- Description copied from class:
AbstractPreprocessorIndex
- Get the classes static logger.
- Specified by:
getLogger in class AbstractPreprocessorIndex<O,List<DistanceResultPair<D extends Distance<D>>>>
- Returns:
- Logger
getLongName
public 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- Specified by:
getLongName in class AbstractIndex<O>
- Returns:
- result name
getShortName
public String getShortName()
- Description copied from interface:
Result
- A short name for the result, useful for file names.
- Specified by:
getShortName in interface Result- Specified by:
getShortName in class AbstractIndex<O>
- Returns:
- result name