GeneralOptimisable
, RootAccess
public final class FreeBranch extends java.lang.Object implements RootAccess, GeneralOptimisable
Constructor | Description |
---|---|
FreeBranch(Node n,
FreeNode parent,
GeneralConstructionTool tool,
GeneralConstraintGroupManager.Store store) |
Continuing recurison constructor for a given tree
|
FreeBranch(Node n,
GeneralConstructionTool tool,
GeneralConstraintGroupManager.Store store) |
The starting constructor for building from a given tree
|
FreeBranch(FreeNode left,
FreeNode right,
double branchLength,
GeneralConstructionTool tool) |
A generic constructor given two already defined left and right children
|
public FreeBranch(Node n, GeneralConstructionTool tool, GeneralConstraintGroupManager.Store store)
n
- The normal PAL node structure to base this tree ontool
- to aid in constructionpublic FreeBranch(Node n, FreeNode parent, GeneralConstructionTool tool, GeneralConstraintGroupManager.Store store)
n
- The PAL node structure to base sub tree onparent
- The parent node (sub tree in other direction)tool
- to aid in constructionpublic FreeBranch(FreeNode left, FreeNode right, double branchLength, GeneralConstructionTool tool)
left
- The left noderight
- The right nodebranchLength
- The length of connectiontool
- to aid in constructionpublic void setAnnotation(java.lang.Object annotation)
public final FreeNode getLeft()
public final FreeNode getRight()
public final void mark()
public final PatternInfo getLeftPatternInfo(GeneralConstructionTool tool)
public final PatternInfo getRightPatternInfo(GeneralConstructionTool tool)
public final PatternInfo getPatternInfo(GeneralConstructionTool tool, FreeNode caller)
public final PatternInfo getCenterPatternInfo(GeneralConstructionTool tool)
public final void undoToMark()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean hasConnection(FreeBranch c, FreeNode caller)
public FreeBranch getLeftLeftBranch()
public FreeBranch getLeftRightBranch()
public FreeBranch getRightLeftBranch()
public FreeBranch getRightRightBranch()
public FreeBranch attachTo(FreeBranch attachmentPoint, FreeBranch[] store)
public Node buildPALNodeBase()
buildPALNodeBase
in interface RootAccess
public Node buildPALNodeES()
buildPALNodeES
in interface RootAccess
public final ConditionalProbabilityStore getLeftFlatConditionalProbabilities(GeneralConstructionTool tool)
public final ConditionalProbabilityStore getRightFlatConditionalProbabilities(GeneralConstructionTool tool)
public final double getBranchLength()
public final void setBranchLength(double x)
public java.lang.String toString(FreeNode caller)
public void testLikelihood(GeneralConstructionTool tool)
testLikelihood
in interface RootAccess
public void testLikelihood(FreeNode caller, GeneralConstructionTool tool)
public ConditionalProbabilityStore getExtendedConditionalProbabilities(FreeNode caller, GeneralConstructionTool tool)
public ConditionalProbabilityStore getExtendedConditionalProbabilities(FreeNode caller, UnconstrainedLikelihoodModel.External externalCalculator, ConditionalProbabilityStore extendedStore, GeneralConstructionTool tool)
public final int getNumberOfOptimisationTypes()
getNumberOfOptimisationTypes
in interface GeneralOptimisable
public double optimise(int optimisationType, UnivariateMinimum minimiser, GeneralConstructionTool tool, int fracDigits)
optimise
in interface GeneralOptimisable
minimiser
- The single dimensional minimisation tooltool
- The construction toolfracDigits
- the number of fractional digits to converge topublic void getAllComponents(java.util.ArrayList store, java.lang.Class componentType)
getAllComponents
in interface RootAccess
public void getAllComponents(java.util.ArrayList store, java.lang.Class componentType, FreeNode caller)
public void getCenterPatternInfo(GeneralConstructionTool tool, PatternInfo store)
public final void doNNI(MersenneTwisterFast r)
public boolean doNNI(boolean leftSwapLeft, boolean rightSwapLeft)
public double calculateLogLikelihood(GeneralConstructionTool tool)
calculateLogLikelihood
in interface RootAccess
public double calculateLogLikelihood2(GeneralConstructionTool tool)
public SiteDetails calculateSiteDetails(UnconstrainedLikelihoodModel.External calculator, GeneralConstructionTool tool)