com.rapidminer.tools.math.container
Class BallTreeNode<T>

java.lang.Object
  extended by com.rapidminer.tools.math.container.BallTreeNode<T>
Type Parameters:
T - This is the type of value with is stored with the points and retrieved on nearest neighbour search

public class BallTreeNode<T>
extends java.lang.Object

The node for a ball tree.

Author:
Sebastian Land

Constructor Summary
BallTreeNode(double[] center, double radius, T value)
           
 
Method Summary
 double[] getCenter()
           
 BallTreeNode<T> getChild()
          This method returns the left child if existing or the right child if left doesnt exist.
 BallTreeNode<T> getLeftChild()
           
 double getRadius()
           
 BallTreeNode<T> getRightChild()
           
 T getStoreValue()
           
 boolean hasLeftChild()
           
 boolean hasRightChild()
           
 boolean hasTwoChilds()
           
 boolean isLeaf()
           
 void replaceChild(BallTreeNode<T> replaceNode, BallTreeNode<T> replacementNode)
           
 void setChild(BallTreeNode<T> node)
           
 void setLeftChild(BallTreeNode<T> leftChild)
           
 void setRadius(double radius)
           
 void setRightChild(BallTreeNode<T> rightChild)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BallTreeNode

public BallTreeNode(double[] center,
                    double radius,
                    T value)
Method Detail

getLeftChild

public BallTreeNode<T> getLeftChild()

setLeftChild

public void setLeftChild(BallTreeNode<T> leftChild)

getRightChild

public BallTreeNode<T> getRightChild()

setRightChild

public void setRightChild(BallTreeNode<T> rightChild)

getCenter

public double[] getCenter()

getRadius

public double getRadius()

replaceChild

public void replaceChild(BallTreeNode<T> replaceNode,
                         BallTreeNode<T> replacementNode)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setRadius

public void setRadius(double radius)

isLeaf

public boolean isLeaf()

hasTwoChilds

public boolean hasTwoChilds()

getChild

public BallTreeNode<T> getChild()
This method returns the left child if existing or the right child if left doesnt exist. If right is null either, then null is returned


setChild

public void setChild(BallTreeNode<T> node)

getStoreValue

public T getStoreValue()

hasLeftChild

public boolean hasLeftChild()

hasRightChild

public boolean hasRightChild()


Copyright © 2001-2009 by Rapid-I