|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoftparsmap.Node
softparsmap.GeneNode
softparsmap.GeneLeaf
Defines a gene leaf in a gene tree.
Constructor Summary | |
GeneLeaf(EdgeType edgeType,
int label)
Same as using the constructor GeneLeaf(edgeType, label, 1.0); |
|
GeneLeaf(EdgeType edgeType,
int label,
double edge)
Construct a gene leaf given an edge type, a label, and an edge value. |
Method Summary | |
GeneNode |
cloneNode()
Returns a copy of this GeneNode. |
int |
compareTo(java.lang.Object o)
Returns this label number minus the given nodes label number. |
GeneLeaf |
findLeaf(GeneLeaf leaf)
Returns the leaf with the same label as given leaf. |
java.util.Set |
getChildren()
Leaves can not have children so this will throw an FatalException . |
SpeciesNode |
getM()
See the m-map in the article. |
boolean |
isBinaryTree()
Return true if the subtree where this node is the root is binary, else false. |
static GeneLeaf |
nextLeaf(EdgeType edgeType)
Returns a new leaf with an unique label. |
Node |
pruneOneChildNodes()
Collapsing all internal nodes with only one child node. |
GeneNode |
rerootThis()
Re-rooting the gene tree that this node is a part of. |
boolean |
rootedEquals(GeneNode leaf)
Returns true if this subtrees have the same rooted topology as the given subtree. |
GeneNode |
setCollapsedEdge(boolean collapsedEdge)
Sets the collapsed flag to given value. |
void |
setM(SpeciesNode m)
Sets the species in which this sequence was found. |
void |
setNewLabel()
Reassigns the label of this node to a new unique number. |
java.lang.String |
toString()
Returns the label number. |
Methods inherited from class softparsmap.Node |
addChild, equals, findLCA, getLabel, getLeaves, getMap, getNodes, getParent, getRoot, getSplits, hasChildren, hashCode, isConsistentWith, isRoot, nextUnique, numChildren, removeChild, setMap, setNextUnique, toStringAll, toStringTable, toStringTree |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GeneLeaf(EdgeType edgeType, int label, double edge)
edgeType
- is the edge typelabel
- is the gene labeledge
- is the value of edge for this leafpublic GeneLeaf(EdgeType edgeType, int label)
Method Detail |
public SpeciesNode getM()
GeneNode
getM
in class GeneNode
public void setM(SpeciesNode m)
m
- is the species in which this sequence was foundpublic java.util.Set getChildren()
FatalException
.
getChildren
in class Node
FatalException
- since a child can not have children.public GeneNode setCollapsedEdge(boolean collapsedEdge)
GeneNode
setCollapsedEdge
in class GeneNode
collapsedEdge
- is new value of the collapsed flag
public Node pruneOneChildNodes()
GeneNode
pruneOneChildNodes
in class GeneNode
public GeneNode cloneNode()
GeneNode
cloneNode
in class GeneNode
public boolean rootedEquals(GeneNode leaf)
GeneNode
rootedEquals
in class GeneNode
leaf
- is the root of the subtree that this subtree will
be compared against
public GeneLeaf findLeaf(GeneLeaf leaf)
GeneNode
findLeaf
in class GeneNode
leaf
- is the leaf
GeneLeaf
public boolean isBinaryTree()
Node
isBinaryTree
in class Node
public int compareTo(java.lang.Object o)
Node
compareTo
in interface java.lang.Comparable
compareTo
in class Node
o
- is the given node
Comparable
public GeneNode rerootThis()
GeneNode
rerootThis
in class GeneNode
public java.lang.String toString()
Node
toString
in class Node
public void setNewLabel()
GeneNode
setNewLabel
in class GeneNode
public static GeneLeaf nextLeaf(EdgeType edgeType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |