O
- Outer object type.I
- Inner object type.public class ProjectedIndex<O,I> extends java.lang.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<? extends O> |
relation
The relation we predend to index.
|
(package private) Relation<I> |
view
The view that we really index.
|
Constructor and Description |
---|
ProjectedIndex(Relation<? extends 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,
java.lang.Object... hints)
Get a KNN query object for the given distance query and k.
|
java.lang.String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
RangeQuery<O> |
getRangeQuery(DistanceQuery<O> distanceQuery,
java.lang.Object... hints)
Get a range query object for the given distance query and k.
|
RKNNQuery<O> |
getRKNNQuery(DistanceQuery<O> distanceQuery,
java.lang.Object... hints)
Get a KNN 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.
|
private static final Logging LOG
Index inner
Projection<O,I> proj
boolean norefine
double kmulti
final Counter refinements
public ProjectedIndex(Relation<? extends 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 java.lang.String getLongName()
Result
getLongName
in interface Result
public java.lang.String getShortName()
Result
getShortName
in interface Result
public void logStatistics()
Index
logStatistics
in interface Index
public KNNQuery<O> getKNNQuery(DistanceQuery<O> distanceQuery, java.lang.Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<O>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
public RangeQuery<O> getRangeQuery(DistanceQuery<O> distanceQuery, java.lang.Object... hints)
RangeIndex
getRangeQuery
in interface RangeIndex<O>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
public RKNNQuery<O> getRKNNQuery(DistanceQuery<O> distanceQuery, java.lang.Object... hints)
RKNNIndex
getRKNNQuery
in interface RKNNIndex<O>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
Copyright © 2019 ELKI Development Team. License information.