|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcs195z.support.PSpeciesNode
public class PSpeciesNode
Modify this node to change information held at each position in the tree. This node has a name, knows the depth in the tree, and stores: 1) Sequence: a sequence of characters at this position 2) Cost: an "array" of integer costs for Sankoff 3) Likelihood: an "array" of floating point likelihoods for Felsenstein
Constructor Summary | |
---|---|
PSpeciesNode()
To simplify the constructor, it takes in no arguments. |
Method Summary | |
---|---|
void |
addCharacter(ZCharacter z)
Adds a character to the back of the stored sequence. |
void |
addToCost(ZCharacter z,
int cost)
Increases the cost for a character by the value of "cost". |
void |
clearCost()
Initializes the cost value array. |
void |
clearLikelihood()
Clears the likelihood probability array. |
int |
getCost(ZCharacter z)
Gives the stored cost for this character in the cost array. |
double |
getLikelihood(ZCharacter z)
Retrieves a likelihood probability for a character. |
String |
getName()
|
ZCharacter[] |
getSequence()
Gives the ordered sequence of characters at this position |
int |
getTreeLevel()
Gives the depth of this node in the tree. |
void |
setCharacter(int index,
ZCharacter z)
Can be used to replace a character at a certain array position. |
void |
setCost(ZCharacter z,
int cost)
Stores a cost value for the character. |
void |
setLikelihood(ZCharacter z,
double d)
Store a likelihood probability for a character. |
void |
setName(String s)
|
void |
setSequence(ZCharacter[] z)
Sets an entire sequence of characters at once. |
void |
setTreeLevel(int level)
Stores the tree level. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PSpeciesNode()
Method Detail |
---|
public String getName()
public void setName(String s)
public ZCharacter[] getSequence()
public void addCharacter(ZCharacter z)
z
- character to storepublic void setCharacter(int index, ZCharacter z)
index
- number of ZCharacter to replace in getSequencez
- character to storepublic void setSequence(ZCharacter[] z)
z
- an ordered array of characterspublic int getCost(ZCharacter z)
z
- character to lookup
public void setCost(ZCharacter z, int cost)
z
- character referencecost
- public void addToCost(ZCharacter z, int cost)
z
- character referencecost
- value to increasepublic void clearCost()
public int getTreeLevel()
public void setTreeLevel(int level)
level
- 0 if root, 1 for next level, etc.public double getLikelihood(ZCharacter z)
z
- character reference
public void setLikelihood(ZCharacter z, double d)
z
- character referenced
- probabilitypublic void clearLikelihood()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |