Package org.tinspin.index.phtree
Class PHTreeP<T>
- java.lang.Object
-
- org.tinspin.index.phtree.PHTreeP<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.tinspin.index.Index
Index.BEComparator, Index.BoxEntry<T>, Index.BoxEntryKnn<T>, Index.BoxFilterKnn<T>, Index.BoxIterator<T>, Index.BoxIteratorKnn<T>, Index.PEComparator, Index.PointEntry<T>, Index.PointEntryKnn<T>, Index.PointFilterKnn<T>, Index.PointIterator<T>, Index.PointIteratorKnn<T>, Index.QueryIterator<T>, Index.QueryIteratorKnn<T>
-
Nested classes/interfaces inherited from interface org.tinspin.index.PointMap
PointMap.Factory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear all entries.booleancontains(double[] key)Lookup an entry, using exact match.static <T> PHTreeP<T>create(int dims)intgetDepth()intgetDims()intgetNodeCount()StatsgetStats()voidinsert(double[] key, T value)Insert a point.Index.PointIterator<T>iterator()Index.PointIterator<T>query(double[] min, double[] max)TqueryExact(double[] point)Lookup an entry, using exact match.Index.PointIteratorKnn<T>queryKnn(double[] center, int k)Finds the nearest neighbor.Tremove(double[] point)Remove a point entry.intsize()StringtoStringTree()Tupdate(double[] oldPoint, double[] newPoint)Update the position of an entry.
-
-
-
Method Detail
-
create
public static <T> PHTreeP<T> create(int dims)
-
getDims
public int getDims()
-
clear
public void clear()
Description copied from interface:IndexClear all entries.
-
getStats
public Stats getStats()
-
getNodeCount
public int getNodeCount()
- Specified by:
getNodeCountin interfaceIndex
-
toStringTree
public String toStringTree()
- Specified by:
toStringTreein interfaceIndex- Returns:
- a full string output of the tree structure with all entries
-
insert
public void insert(double[] key, T value)Description copied from interface:PointMapInsert a point.
-
remove
public T remove(double[] point)
Description copied from interface:PointMapRemove a point entry.
-
update
public T update(double[] oldPoint, double[] newPoint)
Description copied from interface:PointMapUpdate the position of an entry.
-
contains
public boolean contains(double[] key)
Description copied from interface:PointMapLookup an entry, using exact match.
-
queryExact
public T queryExact(double[] point)
Description copied from interface:PointMapLookup an entry, using exact match.- Specified by:
queryExactin interfacePointMap<T>- Parameters:
point- the point- Returns:
- the value of the entry or null if the entry was not found
-
query
public Index.PointIterator<T> query(double[] min, double[] max)
-
iterator
public Index.PointIterator<T> iterator()
-
queryKnn
public Index.PointIteratorKnn<T> queryKnn(double[] center, int k)
Description copied from interface:PointMapFinds the nearest neighbor. This uses Euclidean distance. Other distance types can only be specified directly on the index implementations.
-
-