TreeJuxtaposer
Class RangeNode

java.lang.Object
  |
  +--TreeJuxtaposer.RangeNode

public class RangeNode
extends java.lang.Object

A class representing a node in a RangeTree. A RangeNode is a helper class for computing relationships between phylogenetic trees and is distinct from a TreeNode which is a node of a Tree.

Author:
Yunhong Zhou

Field Summary
private  java.lang.Object Data
          this will hold the data (Tree object or Point)
private  int element
          Field element holds the X or Y coordinate of the object in the tree.
private  RangeNode lc
          left child of the current node
private  int leafCount
          total number of leaves decedant to this node
private  RangeNode rc
          right child of the current node
 
Constructor Summary
RangeNode()
          empty constructor
RangeNode(java.lang.Object d)
          constructor with Data initiated
 
Method Summary
 boolean childless()
           
(package private)  java.lang.Object getData()
           
 int getElement()
           
(package private)  RangeNode getLc()
           
(package private)  int getLeafCount()
          get the total number of leaves decedant to it
(package private)  RangeNode getRc()
           
(package private)  void setData(java.lang.Object d)
           
 void setElement(int e)
          set appropriate coordinate depending on the tree type.
(package private)  void setLeafCount(int cnt)
          set the total of leaves decedant to it
(package private)  void setLeft(RangeNode O)
           
(package private)  void setRight(RangeNode O)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Data

private java.lang.Object Data
this will hold the data (Tree object or Point)


lc

private RangeNode lc
left child of the current node


rc

private RangeNode rc
right child of the current node


element

private int element
Field element holds the X or Y coordinate of the object in the tree. This will help in findSplitRangeNode and Query1D/2D.


leafCount

private int leafCount
total number of leaves decedant to this node

Constructor Detail

RangeNode

public RangeNode()
empty constructor


RangeNode

public RangeNode(java.lang.Object d)
constructor with Data initiated

Method Detail

setElement

public void setElement(int e)
set appropriate coordinate depending on the tree type.


getElement

public int getElement()

childless

public boolean childless()
Returns:
true if the node is a leaf, false otherwise

setData

void setData(java.lang.Object d)

getData

java.lang.Object getData()

getLc

RangeNode getLc()

getRc

RangeNode getRc()

setLeft

void setLeft(RangeNode O)

setRight

void setRight(RangeNode O)

setLeafCount

void setLeafCount(int cnt)
set the total of leaves decedant to it


getLeafCount

int getLeafCount()
get the total number of leaves decedant to it