Package elki.application.cache
Class CacheDoubleDistanceKNNLists<O>
- java.lang.Object
-
- elki.application.AbstractApplication
-
- elki.application.cache.CacheDoubleDistanceKNNLists<O>
-
- Type Parameters:
O- Object type
public class CacheDoubleDistanceKNNLists<O> extends elki.application.AbstractApplicationPrecompute the k nearest neighbors in a disk cache.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCacheDoubleDistanceKNNLists.Par<O>Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private elki.database.DatabasedatabaseData source to process.private elki.distance.Distance<? super O>distanceDistance function that is to be cached.private intkNumber of neighbors to precompute.static intKNN_CACHE_MAGICMagic number to identify files.private static elki.logging.LoggingLOGThe logger for this class.private java.nio.file.PathoutOutput file.
-
Constructor Summary
Constructors Constructor Description CacheDoubleDistanceKNNLists(elki.database.Database database, elki.distance.Distance<? super O> distance, int k, java.nio.file.Path out)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Main method, delegate to super class.voidrun()
-
-
-
Field Detail
-
LOG
private static final elki.logging.Logging LOG
The logger for this class.
-
database
private elki.database.Database database
Data source to process.
-
distance
private elki.distance.Distance<? super O> distance
Distance function that is to be cached.
-
k
private int k
Number of neighbors to precompute.
-
out
private java.nio.file.Path out
Output file.
-
KNN_CACHE_MAGIC
public static final int KNN_CACHE_MAGIC
Magic number to identify files.Note, when cloning this class, and performing any incompatible change to the file format, you should also change this magic ID!
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CacheDoubleDistanceKNNLists
public CacheDoubleDistanceKNNLists(elki.database.Database database, elki.distance.Distance<? super O> distance, int k, java.nio.file.Path out)Constructor.- Parameters:
database- Data sourcedistance- Distance functionk- Number of nearest neighborsout- Matrix output file
-
-