V
- Vector type@Title(value="An approximation based data structure for similarity search") @Reference(authors="Weber, R. and Blott, S.", 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") public class VAFile<V extends NumberVector> extends AbstractRefiningIndex<V> implements KNNIndex<V>, RangeIndex<V>
Weber, R. and Blott, S.
An approximation based data structure for similarity search
in: 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 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,
Object... hints)
Get a KNN query object for the given distance query and k.
|
Logging |
getLogger()
Get the class logger.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
RangeQuery<V> |
getRangeQuery(DistanceQuery<V> distanceQuery,
Object... hints)
Get a range query object for the given distance query and k.
|
long |
getScannedPages()
Get the number of scanned bytes.
|
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 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 IllegalArgumentException
relation
- Data relationIllegalArgumentException
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 String getLongName()
Result
getLongName
in interface Result
getLongName
in class AbstractIndex<V extends NumberVector>
public String getShortName()
Result
getShortName
in interface Result
getShortName
in class AbstractIndex<V extends NumberVector>
public KNNQuery<V> getKNNQuery(DistanceQuery<V> distanceQuery, Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<V extends NumberVector>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
public RangeQuery<V> getRangeQuery(DistanceQuery<V> distanceQuery, Object... hints)
RangeIndex
getRangeQuery
in interface RangeIndex<V extends NumberVector>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.