Likelihood
Class Calculator.SiteCalculator

java.lang.Object
  extended by Likelihood.Calculator.SiteCalculator
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Calculator

public static class Calculator.SiteCalculator
extends java.lang.Object
implements java.lang.Runnable

Calculates the likelihood of a single site. Implemeted like this as it allows parrallel calculation.

Version:
1.0

Constructor Summary
Calculator.SiteCalculator(Site s, Tree t, SiteConstraints con, Probabilities tp)
          Standard constructor
 
Method Summary
 Likelihood.SiteLikelihood calculate()
          Calculates the likelihood
 Likelihood.SiteLikelihood getResult()
          Gets the computed result
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Calculator.SiteCalculator

public Calculator.SiteCalculator(Site s,
                                 Tree t,
                                 SiteConstraints con,
                                 Probabilities tp)
Standard constructor

Parameters:
s - Site
t - Tree
con - Constraints on that site
tp - Pre-computed datastructure containing probabilities
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

calculate

public Likelihood.SiteLikelihood calculate()
Calculates the likelihood

Returns:
Object containing the likelihood and the results of intermediate calculations.

getResult

public Likelihood.SiteLikelihood getResult()
                                    throws Likelihood.Calculator.ResultNotComputed
Gets the computed result

Returns:
The computed result
Throws:
Likelihood.Calculator.ResultNotComputed - If the result has not been computed for any reason.