public class PartialVAFile.PartialVAFileKNNQuery extends AbstractRefiningIndex.AbstractKNNQuery
Modifier and Type | Field and Description |
---|---|
private double |
p
Lp-Norm p.
|
private long[] |
subspace
Subspace.
|
distanceQuery, relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
PartialVAFile.PartialVAFileKNNQuery(DistanceQuery<V> ddq,
double p,
long[] subspace)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private LinkedList<PartialVAFile.PartialVACandidate> |
filter1(int k,
int reducedDims,
List<DAFile> daFiles,
VectorApproximation queryApprox,
int subspaceDims,
VALPNormDistance dist) |
private int |
getIOCosts(DAFile sample,
int numberOfDAFiles)
Computes IO costs (in bytes) needed for reading several DA-files.
|
private int |
getIOCosts(int size,
int subspaceDims)
Computes IO costs (in bytes) needed for refining the candidates.
|
KNNList |
getKNNForObject(V query,
int k)
Get the k nearest neighbors for a particular id.
|
List<DAFile> |
getWorstCaseDistOrder(VALPNormDistance dist,
long[] subspace)
Order subspaces by their worst case distance.
|
protected KNNList |
retrieveAccurateDistances(List<PartialVAFile.PartialVACandidate> sortedCandidates,
int k,
long[] subspace,
V query) |
incRefinements, refine
getKNNForBulkDBIDs, getKNNForDBID
public PartialVAFile.PartialVAFileKNNQuery(DistanceQuery<V> ddq, double p, long[] subspace)
ddq
- Distance queryp
- LP-norm psubspace
- Subspace to querypublic KNNList getKNNForObject(V query, int k)
KNNQuery
getKNNForObject
in interface KNNQuery<V extends NumberVector>
getKNNForObject
in class AbstractDistanceKNNQuery<V extends NumberVector>
query
- Query objectk
- Number of neighbors requestedprivate LinkedList<PartialVAFile.PartialVACandidate> filter1(int k, int reducedDims, List<DAFile> daFiles, VectorApproximation queryApprox, int subspaceDims, VALPNormDistance dist)
private int getIOCosts(int size, int subspaceDims)
size
- The nuber of candidatessubspaceDims
- the required subspace dimensionsprivate int getIOCosts(DAFile sample, int numberOfDAFiles)
sample
- the DA-file specific costsnumberOfDAFiles
- the number of DA-files that have to be readpublic List<DAFile> getWorstCaseDistOrder(VALPNormDistance dist, long[] subspace)
dist
- Distance functionsubspace
- Subspaceprotected KNNList retrieveAccurateDistances(List<PartialVAFile.PartialVACandidate> sortedCandidates, int k, long[] subspace, V query)
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.