Package elki.database.query.range
Class WrappedRangeDBIDByLookup<O>
- java.lang.Object
-
- elki.database.query.range.WrappedRangeDBIDByLookup<O>
-
- Type Parameters:
O
- relation object type
- All Implemented Interfaces:
RangeSearcher<DBIDRef>
- Direct Known Subclasses:
WrappedRangeDBIDByLookup.Linear
public class WrappedRangeDBIDByLookup<O> extends java.lang.Object implements RangeSearcher<DBIDRef>
Find radius neighbors by querying with the original object.- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WrappedRangeDBIDByLookup.Linear<O>
Linear scan searcher.
-
Constructor Summary
Constructors Modifier Constructor Description private
WrappedRangeDBIDByLookup(Relation<? extends O> relation, RangeSearcher<O> inner)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModifiableDoubleDBIDList
getRange(DBIDRef query, double range, ModifiableDoubleDBIDList result)
Get the neighbors for a particular id in a given query range.static <O> RangeSearcher<DBIDRef>
wrap(Relation<? extends O> relation, RangeSearcher<O> inner)
Wrap a query, if notnull
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.database.query.range.RangeSearcher
getRange
-
-
-
-
Field Detail
-
inner
private RangeSearcher<O> inner
Inner radius searcher.
-
-
Constructor Detail
-
WrappedRangeDBIDByLookup
private WrappedRangeDBIDByLookup(Relation<? extends O> relation, RangeSearcher<O> inner)
Constructor.- Parameters:
relation
- data relationinner
- inner radius searcher
-
-
Method Detail
-
getRange
public ModifiableDoubleDBIDList getRange(DBIDRef query, double range, ModifiableDoubleDBIDList result)
Description copied from interface:RangeSearcher
Get the neighbors for a particular id in a given query range.- Specified by:
getRange
in interfaceRangeSearcher<O>
- Parameters:
query
- query object IDrange
- Query rangeresult
- Output data structure- Returns:
- neighbors
-
wrap
public static <O> RangeSearcher<DBIDRef> wrap(Relation<? extends O> relation, RangeSearcher<O> inner)
Wrap a query, if notnull
.- Type Parameters:
O
- inner data type- Parameters:
relation
- Relation to get object frominner
- inner query- Returns:
- wrapped query, or
null
if inner wasnull
-
-