O
- Outer object type.I
- Inner object type.public class ProjectedIndex<O,I> extends Object implements KNNIndex<O>, RKNNIndex<O>, RangeIndex<O>
LatLngAsECEFIndex
and LngLatAsECEFIndex
for example
indexes that support only a specific (good) combination.
FIXME: add refinement to bulk queries!Modifier and Type | Class and Description |
---|---|
static class |
ProjectedIndex.Factory<O,I>
Index factory.
|
(package private) class |
ProjectedIndex.ProjectedKNNQuery
Class to proxy kNN queries.
|
(package private) class |
ProjectedIndex.ProjectedRangeQuery
Class to proxy range queries.
|
(package private) class |
ProjectedIndex.ProjectedRKNNQuery
Class to proxy RkNN queries.
|
Modifier and Type | Field and Description |
---|---|
(package private) Index |
inner
Inner index.
|
(package private) double |
kmulti
Multiplier for k.
|
private static Logging |
LOG
Class logger
|
(package private) boolean |
norefine
Refinement disable flag.
|
(package private) Projection<O,I> |
proj
Projection.
|
(package private) Counter |
refinements
Count the number of distance refinements computed.
|
(package private) Relation<O> |
relation
The relation we predend to index.
|
(package private) Relation<I> |
view
The view that we really index.
|
Constructor and Description |
---|
ProjectedIndex(Relation<O> relation,
Projection<O,I> proj,
Relation<I> view,
Index inner,
boolean norefine,
double kmulti)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
countRefinement()
Count a single distance refinement.
|
KNNQuery<O> |
getKNNQuery(DistanceQuery<O> distanceQuery,
Object... hints)
Get a KNN query object for the given distance query and k.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
RangeQuery<O> |
getRangeQuery(DistanceQuery<O> distanceQuery,
Object... hints)
Get a range query object for the given distance query and k.
|
RKNNQuery<O> |
getRKNNQuery(DistanceQuery<O> distanceQuery,
Object... hints)
Get a KNN 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.
|
private static final Logging LOG
Index inner
Projection<O,I> proj
boolean norefine
double kmulti
final Counter refinements
public ProjectedIndex(Relation<O> relation, Projection<O,I> proj, Relation<I> view, Index inner, boolean norefine, double kmulti)
relation
- Relation to index.proj
- Projection to use.view
- View to use.inner
- Index to wrap.norefine
- Refinement disable flag.kmulti
- Multiplicator for kprivate void countRefinement()
public void initialize()
Index
initialize
in interface Index
public String getLongName()
Result
getLongName
in interface Result
public String getShortName()
Result
getShortName
in interface Result
public void logStatistics()
Index
logStatistics
in interface Index
public KNNQuery<O> getKNNQuery(DistanceQuery<O> distanceQuery, Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<O>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
public RangeQuery<O> getRangeQuery(DistanceQuery<O> distanceQuery, Object... hints)
RangeIndex
getRangeQuery
in interface RangeIndex<O>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
public RKNNQuery<O> getRKNNQuery(DistanceQuery<O> distanceQuery, Object... hints)
RKNNIndex
getRKNNQuery
in interface RKNNIndex<O>
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.