public class SlidingMidPointOfWidestSide extends KDTreeNodeSplitter
@manual{Mount2006,
address = {College Park, MD, USA},
author = {David M. Mount},
organization = {Department of Computer Science, University of Maryland},
title = {ANN Programming Manual},
year = {2006},
HTTP = {Available from http://www.cs.umd.edu/\~mount/ANN/}
}
| Modifier and Type | Field and Description |
|---|---|
protected static double |
ERR
The floating point error to tolerate in finding the widest
rectangular side.
|
m_EuclideanDistance, m_Instances, m_InstList, m_NormalizeNodeWidth, MAX, MIN, WIDTH| Constructor and Description |
|---|
SlidingMidPointOfWidestSide() |
| Modifier and Type | Method and Description |
|---|---|
String |
globalInfo()
Returns a string describing this nearest neighbour search algorithm.
|
protected int |
rearrangePoints(int[] indices,
int startidx,
int endidx,
int splitDim,
double splitVal)
Re-arranges the indices array such that the points <= to the splitVal
are on the left of the array and those > the splitVal are on the right.
|
void |
splitNode(KDTreeNode node,
int numNodesCreated,
double[][] nodeRanges,
double[][] universe)
Splits a node into two based on the midpoint value of the dimension
in which the node's rectangle is widest.
|
correctlyInitialized, getOptions, listOptions, setEuclideanDistanceFunction, setInstanceList, setInstances, setNodeWidthNormalization, setOptions, widestDimprotected static double ERR
public String globalInfo()
public void splitNode(KDTreeNode node, int numNodesCreated, double[][] nodeRanges, double[][] universe) throws Exception
splitNode in class KDTreeNodeSplitternode - The node to split.numNodesCreated - The number of nodes that so far have been
created for the tree, so that the newly created nodes are
assigned correct/meaningful node numbers/ids.nodeRanges - The attributes' range for the points inside
the node that is to be split.universe - The attributes' range for the whole
point-space.Exception - If there is some problem in splitting the
given node.protected int rearrangePoints(int[] indices,
int startidx,
int endidx,
int splitDim,
double splitVal)
indices - The master index array.startidx - The begining index of portion of indices that needs
re-arranging.endidx - The end index of portion of indices that needs
re-arranging.splitDim - The split dimension/attribute.splitVal - The split value.Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.