public class MedianOfWidestDimension extends KDTreeNodeSplitter
@article{Friedman1977,
author = {Jerome H. Friedman and Jon Luis Bentley and Raphael Ari Finkel},
journal = {ACM Transactions on Mathematics Software},
month = {September},
number = {3},
pages = {209-226},
title = {An Algorithm for Finding Best Matches in Logarithmic Expected Time},
volume = {3},
year = {1977}
}
m_EuclideanDistance, m_Instances, m_InstList, m_NormalizeNodeWidth, MAX, MIN, WIDTH| Constructor and Description |
|---|
MedianOfWidestDimension() |
| Modifier and Type | Method and Description |
|---|---|
String |
globalInfo()
Returns a string describing this nearest neighbour search algorithm.
|
protected int |
partition(int attIdx,
int[] index,
int l,
int r)
Partitions the instances around a pivot.
|
int |
select(int attIdx,
int[] indices,
int left,
int right,
int k)
Implements computation of the kth-smallest element according
to Manber's "Introduction to Algorithms".
|
void |
splitNode(KDTreeNode node,
int numNodesCreated,
double[][] nodeRanges,
double[][] universe)
Splits a node into two based on the median value of the dimension
in which the points have the widest spread.
|
correctlyInitialized, getOptions, listOptions, setEuclideanDistanceFunction, setInstanceList, setInstances, setNodeWidthNormalization, setOptions, widestDimpublic 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 partition(int attIdx,
int[] index,
int l,
int r)
attIdx - The attribution/dimension based on which the
instances should be partitioned.index - The master index array containing indices of the
instances.l - The begining index of the portion of master index
array that should be partitioned.r - The end index of the portion of master index array
that should be partitioned.public int select(int attIdx,
int[] indices,
int left,
int right,
int k)
attIdx - The dimension/attribute of the instances in
which to find the kth-smallest element.indices - The master index array containing indices of
the instances.left - The begining index of the portion of the master
index array in which to find the kth-smallest element.right - The end index of the portion of the master index
array in which to find the kth-smallest element.k - The value of kCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.