V
- Vector type@Title(value="An approximation based data structure for similarity search") @Reference(authors="R. Weber, S. Blott", title="An approximation based data structure for similarity search", booktitle="Report TR1997b, ETH Zentrum, Zurich, Switzerland", url="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.40.480&rep=rep1&type=pdf", bibkey="tr/ethz/WeberS97") public class VAFile<V extends NumberVector> extends AbstractRefiningIndex<V> implements KNNIndex<V>, RangeIndex<V>
Reference:
R. Weber, S. Blott
An approximation based data structure for similarity search
Report TR1997b, ETH Zentrum, Zurich, Switzerland
Modifier and Type | Class and Description |
---|---|
static class |
VAFile.Factory<V extends NumberVector>
Index factory class.
|
class |
VAFile.VAFileKNNQuery
KNN query for this index.
|
class |
VAFile.VAFileRangeQuery
Range query for this index.
|
AbstractRefiningIndex.AbstractKNNQuery, AbstractRefiningIndex.AbstractRangeQuery
Modifier and Type | Field and Description |
---|---|
private static Logging |
LOG
Logging class.
|
(package private) int |
pageSize
Page size, for estimating the VA file size.
|
private int |
partitions
Number of partitions.
|
(package private) int |
scans
Number of scans we performed.
|
private double[][] |
splitPositions
Quantile grid we use.
|
private java.util.List<VectorApproximation> |
vectorApprox
Approximation index.
|
relation
Constructor and Description |
---|
VAFile(int pageSize,
Relation<V> relation,
int partitions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
VectorApproximation |
calculateApproximation(DBID id,
V dv)
Calculate the VA file position given the existing borders.
|
KNNQuery<V> |
getKNNQuery(DistanceQuery<V> distanceQuery,
java.lang.Object... hints)
Get a KNN query object for the given distance query and k.
|
Logging |
getLogger()
Get the class logger.
|
java.lang.String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
RangeQuery<V> |
getRangeQuery(DistanceQuery<V> distanceQuery,
java.lang.Object... hints)
Get a range query object for the given distance query and k.
|
long |
getScannedPages()
Get the number of scanned bytes.
|
java.lang.String |
getShortName()
A short name for the result, useful for file names.
|
void |
initialize()
Initialize the index.
|
void |
logStatistics()
Send statistics to the logger, if enabled.
|
void |
setPartitions(Relation<V> relation)
Initialize the data set grid by computing quantiles.
|
countRefinements, refine
private static final Logging LOG
private java.util.List<VectorApproximation> vectorApprox
private int partitions
private double[][] splitPositions
int pageSize
int scans
public void initialize()
Index
initialize
in interface Index
public void setPartitions(Relation<V> relation) throws java.lang.IllegalArgumentException
relation
- Data relationjava.lang.IllegalArgumentException
public VectorApproximation calculateApproximation(DBID id, V dv)
id
- Object IDdv
- Data vectorpublic long getScannedPages()
public Logging getLogger()
AbstractRefiningIndex
getLogger
in class AbstractRefiningIndex<V extends NumberVector>
public void logStatistics()
Index
logStatistics
in interface Index
logStatistics
in class AbstractRefiningIndex<V extends NumberVector>
public java.lang.String getLongName()
Result
getLongName
in interface Result
getLongName
in class AbstractIndex<V extends NumberVector>
public java.lang.String getShortName()
Result
getShortName
in interface Result
getShortName
in class AbstractIndex<V extends NumberVector>
public KNNQuery<V> getKNNQuery(DistanceQuery<V> distanceQuery, java.lang.Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<V extends NumberVector>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
public RangeQuery<V> getRangeQuery(DistanceQuery<V> distanceQuery, java.lang.Object... hints)
RangeIndex
getRangeQuery
in interface RangeIndex<V extends NumberVector>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
Copyright © 2019 ELKI Development Team. License information.