org.forester.phylogenyinference
Class FitchParsimony<STATE_TYPE>

java.lang.Object
  extended by org.forester.phylogenyinference.FitchParsimony<STATE_TYPE>

public class FitchParsimony<STATE_TYPE>
extends Object


Constructor Summary
FitchParsimony()
           
 
Method Summary
 void execute(Phylogeny p, CharacterStateMatrix<STATE_TYPE> external_node_states_matrix)
           
 int getCost()
           
 CharacterStateMatrix<CharacterStateMatrix.GainLossStates> getGainLossMatrix()
           
 CharacterStateMatrix<STATE_TYPE> getInternalStatesMatrix()
           
 CharacterStateMatrix<List<STATE_TYPE>> getInternalStatesMatrixPriorToTraceback()
          Returns a view of the internal states prior to trace-back.
 int getTotalGains()
           
 int getTotalLosses()
           
 int getTotalUnchanged()
           
 void setRandomize(boolean randomize)
           
 void setRandomNumberSeed(long random_number_seed)
           
 void setReturnGainLossMatrix(boolean return_gain_loss)
           
 void setReturnInternalStates(boolean return_internal_states)
           
 void setUseLast(boolean use_last)
          This sets whether to use the first or last state in the sorted states at the undecided internal nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitchParsimony

public FitchParsimony()
Method Detail

execute

public void execute(Phylogeny p,
                    CharacterStateMatrix<STATE_TYPE> external_node_states_matrix)

getCost

public int getCost()

getGainLossMatrix

public CharacterStateMatrix<CharacterStateMatrix.GainLossStates> getGainLossMatrix()

getInternalStatesMatrix

public CharacterStateMatrix<STATE_TYPE> getInternalStatesMatrix()

getInternalStatesMatrixPriorToTraceback

public CharacterStateMatrix<List<STATE_TYPE>> getInternalStatesMatrixPriorToTraceback()
Returns a view of the internal states prior to trace-back.

Returns:

getTotalGains

public int getTotalGains()

getTotalLosses

public int getTotalLosses()

getTotalUnchanged

public int getTotalUnchanged()

setRandomize

public void setRandomize(boolean randomize)

setRandomNumberSeed

public void setRandomNumberSeed(long random_number_seed)

setReturnGainLossMatrix

public void setReturnGainLossMatrix(boolean return_gain_loss)

setReturnInternalStates

public void setReturnInternalStates(boolean return_internal_states)

setUseLast

public void setUseLast(boolean use_last)
This sets whether to use the first or last state in the sorted states at the undecided internal nodes. For randomized choices set randomize to true (and this to false). Note. It might be advisable to set this to false for BinaryStates if absence at the root is preferred (given the enum BinaryStates sorts in the following order: ABSENT, UNKNOWN, PRESENT).

Parameters:
use_last -