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)", url="https://doi.org/10.1109/SSDBM.2006.23", bibkey="DBLP:conf/ssdbm/KriegelKSZ06") public class PartialVAFile<V extends NumberVector> extends AbstractRefiningIndex<V> implements KNNIndex<V>, RangeIndex<V>
Reference:
Hans-Peter Kriegel, Peer Kröger, Matthias Schubert, Ziyue Zhu
Efficient Query Processing in Arbitrary Subspaces Using Vector
Approximations
Proc. 18th Int. Conf. on Scientific and Statistical Database Management
(SSDBM 06)
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, AbstractRefiningIndex.AbstractRangeQuery
Modifier and Type | Field and Description |
---|---|
(package private) java.util.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 java.util.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,
java.util.List<DoubleObjPair<DAFile>> daFiles)
Calculate partial vector approximation.
|
protected static void |
calculateSelectivityCoeffs(java.util.List<DoubleObjPair<DAFile>> daFiles,
NumberVector query,
double epsilon)
Calculate selectivity coefficients.
|
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.
|
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.
|
countRefinements, refine
private static final Logging LOG
java.util.List<DAFile> daFiles
private final int partitions
private final int pageSize
private double[][] splitPartitions
protected PartialVAFile.Statistics stats
private java.util.ArrayList<VectorApproximation> vectorApprox
public void initialize() throws java.lang.IllegalStateException
Index
initialize
in interface Index
java.lang.IllegalStateException
public java.lang.String getShortName()
Result
getShortName
in interface Result
getShortName
in class AbstractIndex<V extends NumberVector>
public java.lang.String getLongName()
Result
getLongName
in interface Result
getLongName
in class AbstractIndex<V extends NumberVector>
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>
protected VectorApproximation calculateFullApproximation(DBID id, V dv)
id
- Object IDdv
- Data vectorpublic 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
protected static void calculateSelectivityCoeffs(java.util.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, java.util.List<DoubleObjPair<DAFile>> daFiles)
id
- Object IDdv
- Object vectordaFiles
- List of approximations to useCopyright © 2019 ELKI Development Team. License information.