|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.metaqtl.TreeNode
public class TreeNode
This class represents a node in a binary Tree obtained
when applying usual hirarchical clustering methods.
An array of TreeNode can then be viewed as
a tree.
| Field Summary | |
|---|---|
int |
card
The number of sequences in the cluster |
TreeNode[] |
children
Left and right children, or null |
double |
dist
The distance between the node and its parent. |
double |
height
The distance between the node and the root of the tree (if defined). |
int |
idx
? The identifiant of the cluster. |
java.lang.String |
label
The label of the cluster |
boolean |
leaf
The status of the node. |
int[] |
nidx
The indices of the sub-nodes |
TreeNode |
parent
The parent of the node |
double |
x
|
double |
xc
|
double |
y
|
| Constructor Summary | |
|---|---|
TreeNode()
Creates a new instance of TreeNode with
default attribute values. |
|
TreeNode(int idx)
Creates a new instance of TreeNode
with the given indice idx. |
|
TreeNode(int idx,
TreeNode[] children)
Creates a new instance of TreeNode with the
given indice idx and the children of the node. |
|
| Method Summary | |
|---|---|
void |
addChild(TreeNode node)
Add a child to the node. |
int |
getCard()
|
double |
getCentroid(double[] y2,
double[] sd)
|
TreeNode[] |
getChildren()
|
double |
getDist()
|
double |
getHeight()
|
java.lang.String |
getName()
|
TreeNode |
getParent()
|
double |
getX()
|
double |
getY()
|
void |
setCentroid(double xc)
|
void |
setX(double x)
|
void |
setY(double y)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int idx
public java.lang.String label
public int card
public int[] nidx
public boolean leaf
public double dist
public double height
public TreeNode[] children
public TreeNode parent
public double x
public double y
public double xc
| Constructor Detail |
|---|
public TreeNode(int idx)
TreeNode
with the given indice idx. Use it
to create the leaves of the tree.
idx - the indice of the node.
public TreeNode(int idx,
TreeNode[] children)
TreeNode with the
given indice idx and the children of the node.
Use this constructor to create the internal nodes of the tree.
public TreeNode()
TreeNode with
default attribute values.
| Method Detail |
|---|
public void addChild(TreeNode node)
node - public java.lang.String getName()
public TreeNode[] getChildren()
public int getCard()
public double getHeight()
public void setX(double x)
x - public void setY(double y)
x - public double getY()
public double getX()
public double getDist()
public TreeNode getParent()
public void setCentroid(double xc)
d -
public double getCentroid(double[] y2,
double[] sd)
y2 - sd -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||