cs195z.phylogeny
Class PStudentTreeAlgorithms

java.lang.Object
  extended by cs195z.phylogeny.PStudentTreeAlgorithms
All Implemented Interfaces:
PTreeAlgorithms

public class PStudentTreeAlgorithms
extends Object
implements PTreeAlgorithms


Field Summary
 
Fields inherited from interface cs195z.support.PTreeAlgorithms
INFINITY
 
Constructor Summary
PStudentTreeAlgorithms()
          Please do not add arguments to the constructor.
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Method Detail

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 complete
stateIndices - the indices for transitionProb, by ZCharacter
sequenceLength - 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 complete
stateIndices - the indices for costMatrix, by ZCharacter
costMatrix - the scoring matrix from [parent][child]
sequenceLength - we conveniently provide the length in characters