cs195z.phylogeny
Class PStudentTreeAlgorithms
java.lang.Object
cs195z.phylogeny.PStudentTreeAlgorithms
- All Implemented Interfaces:
- PTreeAlgorithms
public class PStudentTreeAlgorithms
- extends Object
- implements PTreeAlgorithms
Method Summary |
void |
felsenstein(net.datastructures.LinkedBinaryTree<PSpeciesNode> tree,
HashMap<ZCharacter,Integer> stateIndices,
double[][] transitionProb,
int sequenceLength)
Implements the Felsenstein max likelihood algorithm and makes changes to the PSpeciesNodes. |
void |
sankoff(net.datastructures.LinkedBinaryTree<PSpeciesNode> tree,
HashMap<ZCharacter,Integer> stateIndices,
int[][] costMatrix,
int sequenceLength)
Implements the Sankoff algorithm and makes changes to the PSpeciesNodes. |
PStudentTreeAlgorithms
public PStudentTreeAlgorithms()
- Please do not add arguments to the constructor. If you wish, you
can initialize the class (with private variables) but this
is not required.
felsenstein
public void felsenstein(net.datastructures.LinkedBinaryTree<PSpeciesNode> tree,
HashMap<ZCharacter,Integer> stateIndices,
double[][] transitionProb,
int sequenceLength)
- Description copied from interface:
PTreeAlgorithms
- Implements the Felsenstein max likelihood algorithm and makes changes to the PSpeciesNodes.
See docs, especially for the probability specification.
- Specified by:
felsenstein
in interface PTreeAlgorithms
- Parameters:
tree
- a binary tree with the constraint that it is completestateIndices
- the indices for transitionProb, by ZCharactersequenceLength
- we conveniently provide the length in characters
sankoff
public void sankoff(net.datastructures.LinkedBinaryTree<PSpeciesNode> tree,
HashMap<ZCharacter,Integer> stateIndices,
int[][] costMatrix,
int sequenceLength)
- Description copied from interface:
PTreeAlgorithms
- Implements the Sankoff algorithm and makes changes to the PSpeciesNodes.
See docs.
- Specified by:
sankoff
in interface PTreeAlgorithms
- Parameters:
tree
- a binary tree with the constraint that it is completestateIndices
- the indices for costMatrix, by ZCharactercostMatrix
- the scoring matrix from [parent][child]sequenceLength
- we conveniently provide the length in characters