Package elki.index.tree.metrical.vptree
Class VPTree.Builder
- java.lang.Object
-
- elki.index.tree.metrical.vptree.VPTree.Builder
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Random
rnd
Random generator(package private) ModifiableDoubleDBIDList
scratch
Scratch space for organizing the elements(package private) DoubleDBIDListMIter
scratchit
Scratch iterator
-
Constructor Summary
Constructors Constructor Description Builder()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private VPTree.Node
buildTree(int left, int right)
Build the tree recursivelyprivate double
calcMoment(DBIDRef p, DBIDs check, int size)
Calculate the 2nd moment to the median of the distances to pprivate DBIDVar
chooseVantagePoint(int left, int right)
Find a vantage points in the DBIDs between left and right
-
-
-
Field Detail
-
scratch
ModifiableDoubleDBIDList scratch
Scratch space for organizing the elements
-
scratchit
DoubleDBIDListMIter scratchit
Scratch iterator
-
rnd
java.util.Random rnd
Random generator
-
-
Method Detail
-
buildTree
private VPTree.Node buildTree(int left, int right)
Build the tree recursively- Parameters:
left
- Left bound in scratchright
- Right bound in scratch- Returns:
- new node
-
chooseVantagePoint
private DBIDVar chooseVantagePoint(int left, int right)
Find a vantage points in the DBIDs between left and right- Parameters:
left
- Left bound in scratchright
- Right bound in scratch- Returns:
- vantage point
-
-