
V - Vector type@Reference(authors="Hans-Peter Kriegel, Peer Kr\u00f6ger, Matthias Schubert, Ziyue Zhu", title="Efficient Query Processing in Arbitrary Subspaces Using Vector Approximations", booktitle="Proc. 18th Int. Conf. on Scientific and Statistical Database Management (SSDBM 06), Wien, Austria, 2006", url="http://dx.doi.org/10.1109/SSDBM.2006.23") public class PartialVAFile<V extends NumberVector<?>> extends AbstractRefiningIndex<V> implements KNNIndex<V>, RangeIndex<V>
Hans-Peter Kriegel, Peer Kröger, Matthias Schubert, Ziyue Zhu:
Efficient Query Processing in Arbitrary Subspaces Using Vector Approximations
in Proc. 18th Int. Conf. on Scientific and Statistical Database Management
(SSDBM 06), Wien, Austria, 2006.
| Modifier and Type | Class and Description |
|---|---|
static class |
PartialVAFile.Factory<V extends NumberVector<?>>
Index factory class.
|
protected static class |
PartialVAFile.PartialVACandidate
Object in a VA approximation.
|
class |
PartialVAFile.PartialVAFileKNNQuery
KNN query for this index.
|
class |
PartialVAFile.PartialVAFileRangeQuery
Range query for this index.
|
static class |
PartialVAFile.Statistics
Class for tracking Partial VA file statistics.
|
protected static class |
PartialVAFile.WorstCaseDistComparator
Compare DAfiles by their worst case distance.
|
AbstractRefiningIndex.AbstractKNNQuery<D extends Distance<D>>, AbstractRefiningIndex.AbstractRangeQuery<D extends Distance<D>>| Modifier and Type | Field and Description |
|---|---|
(package private) List<DAFile> |
daFiles
Partial VA files.
|
private static Logging |
LOG
Class logger.
|
private int |
pageSize
Page size.
|
private int |
partitions
Number of partitions.
|
private double[][] |
splitPartitions
Splitting grid.
|
protected PartialVAFile.Statistics |
stats
Statistics.
|
private ArrayList<VectorApproximation> |
vectorApprox
The (full - we are in-memory only right now) vector approximations.
|
relation| Constructor and Description |
|---|
PartialVAFile(int pageSize,
Relation<V> relation,
int partitions)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected VectorApproximation |
calculateFullApproximation(DBID id,
V dv)
Calculate the VA file position given the existing borders.
|
protected static VectorApproximation |
calculatePartialApproximation(DBID id,
NumberVector<?> dv,
List<DoubleObjPair<DAFile>> daFiles)
Calculate partial vector approximation.
|
protected static void |
calculateSelectivityCoeffs(List<DoubleObjPair<DAFile>> daFiles,
NumberVector<?> query,
double epsilon)
Calculate selectivity coefficients.
|
protected static BitSet |
fakeSubspace(Relation<? extends NumberVector<?>> relation)
Fake subspace (full-dimensional).
|
<D extends Distance<D>> |
getKNNQuery(DistanceQuery<V,D> 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.
|
<D extends Distance<D>> |
getRangeQuery(DistanceQuery<V,D> distanceQuery,
Object... hints)
Get a range query object for the given distance query and k.
|
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.
|
countRefinements, refineprivate static final Logging LOG
private final int partitions
private final int pageSize
private double[][] splitPartitions
protected PartialVAFile.Statistics stats
private ArrayList<VectorApproximation> vectorApprox
public void initialize()
throws IllegalStateException
Indexinitialize in interface IndexIllegalStateExceptionpublic String getShortName()
ResultgetShortName in interface ResultgetShortName in class AbstractIndex<V extends NumberVector<?>>public String getLongName()
ResultgetLongName in interface ResultgetLongName in class AbstractIndex<V extends NumberVector<?>>public Logging getLogger()
AbstractRefiningIndexgetLogger in class AbstractRefiningIndex<V extends NumberVector<?>>public void logStatistics()
IndexlogStatistics in interface IndexlogStatistics in class AbstractRefiningIndex<V extends NumberVector<?>>protected static BitSet fakeSubspace(Relation<? extends NumberVector<?>> relation)
relation - Relation with full dimensionalityprotected VectorApproximation calculateFullApproximation(DBID id, V dv)
id - Object IDdv - Data vectorpublic <D extends Distance<D>> KNNQuery<V,D> getKNNQuery(DistanceQuery<V,D> distanceQuery, Object... hints)
KNNIndexgetKNNQuery in interface KNNIndex<V extends NumberVector<?>>D - Distance typedistanceQuery - Distance queryhints - Hints for the optimizernullpublic <D extends Distance<D>> RangeQuery<V,D> getRangeQuery(DistanceQuery<V,D> distanceQuery, Object... hints)
RangeIndexgetRangeQuery in interface RangeIndex<V extends NumberVector<?>>D - Distance typedistanceQuery - Distance queryhints - Hints for the optimizernullprotected static void calculateSelectivityCoeffs(List<DoubleObjPair<DAFile>> daFiles, NumberVector<?> query, double epsilon)
daFiles - List of files to usequery - Query vectorepsilon - Epsilon radiusprotected static VectorApproximation calculatePartialApproximation(DBID id, NumberVector<?> dv, List<DoubleObjPair<DAFile>> daFiles)
id - Object IDdv - Object vectordaFiles - List of approximations to use