public class PivotNode extends AbstractParentableConstrainedNode implements GeneralOptimisable, ParentableConstrainedNode, FreeNode, RootAccess, GroupLeader
Constructor and Description |
---|
PivotNode(Node tree,
FreeBranch parentConnection,
GeneralConstructionTool tool,
GeneralConstraintGroupManager constraintGroupManager,
GeneralConstraintGroupManager.Store store)
The subtree constructor with a connection to the rest of the tree
|
PivotNode(Node subTree,
GeneralConstructionTool tool,
GeneralConstraintGroupManager groupManager,
GeneralConstraintGroupManager.Store store)
The root constructor, only used when the whole tree is constrained
|
adjustNodeHeight, buildDescendentPALNodeBase, buildDescendentPALNodeES, buildLeftDecendentPALNodeBase, buildRightDecendentPALNodeBase, getAllComponents, getConstrainedInternal, getDescendentExtendedConditionals, getDescendentExtendedConditionalsWithAdjustedInternalHeights, getDescendentFlatConditionals, getDescendentLogLikelihood, getDescendentPatternInfo, getLeftChild, getLeftChildPatternInfo, getLeftDescendentExtendedConditionals, getLeftDescendentExtendedConditionals, getMaxChildHeight, getMaxOriginalDescendentLeafHeight, getMinimumChildSeperation, getMinimumChildSeperation, getMinimumDirectChildDistance, getMinimumLeafChildSeperation, getMinimumLeafChildSeperation, getMinOriginalDescendentLeafHeight, getNodeHeight, getNonSubTreeOfChildComponents, getRightChild, getRightChildPatternInfo, getRightDescendentExtendedConditionals, getRightDescendentExtendedConditionals, getSubTreeComponents, isLeftChild, obtainConstrainedExternalCalculator, obtainLeafInformation, rebuildDescendentPattern, recursivelyAdjustNodeHeight, recursivelySetChildrenParentPivot, setNodeHeight, setupInternalNodeHeights, toStringHeights, toStringLengths, toStringLengths
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNodeHeight, getNonSubTreeOfChildComponents
getAllComponents
getAllComponents
obtainLeafInformation
public PivotNode(Node tree, FreeBranch parentConnection, GeneralConstructionTool tool, GeneralConstraintGroupManager constraintGroupManager, GeneralConstraintGroupManager.Store store)
tree
- the PAL node tree to base this tree onparentConnection
- The connection with the rest of tree (must be free, otherwise this shouldn't be the pivot)tool
- A general construction tool object for objtaining/building various componentsgroupConstraints
- The constraints object that manages the leaf constraintspublic PivotNode(Node subTree, GeneralConstructionTool tool, GeneralConstraintGroupManager groupManager, GeneralConstraintGroupManager.Store store)
tool
- A general construction tool object for objtaining/building various componentssubTree
- The subtreegroupConstraints
- The constraints object that manages the leaf constraintspublic void postSetupNotify(ConstraintModel.GroupManager groupConstraints)
GroupLeader
postSetupNotify
in interface GroupLeader
public Node buildPALNodeBase()
buildPALNodeBase
in interface RootAccess
public Node buildPALNodeES()
buildPALNodeES
in interface RootAccess
public java.lang.String toString()
toString
in class java.lang.Object
public ConditionalProbabilityStore getAscendentExtended(double baseHeight, ConstrainedNode childCaller, GeneralConstructionTool tool, boolean allowCaching)
getAscendentExtended
in interface ParentableConstrainedNode
public ConditionalProbabilityStore getAscendentFlat(ConstrainedNode childCaller, GeneralConstructionTool tool, boolean allowCaching)
getAscendentFlat
in interface ParentableConstrainedNode
public PatternInfo getAscendentPatternInfo(ConstrainedNode childCaller, GeneralConstructionTool tool)
getAscendentPatternInfo
in interface ParentableConstrainedNode
public double calculateLogLikelihood(GeneralConstructionTool tool)
calculateLogLikelihood
in interface RootAccess
public PatternInfo getPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
getPatternInfo
in interface FreeNode
public boolean hasConnection(FreeBranch c, FreeBranch caller)
hasConnection
in interface FreeNode
public FreeBranch getLeftBranch(FreeBranch caller)
getLeftBranch
in interface FreeNode
public FreeBranch getRightBranch(FreeBranch caller)
getRightBranch
in interface FreeNode
public void getAllComponents(java.util.ArrayList store, java.lang.Class componentType, FreeBranch caller)
FreeNode
getAllComponents
in interface FreeNode
public void testLikelihood(FreeBranch caller, GeneralConstructionTool tool)
testLikelihood
in interface FreeNode
public void testLikelihood(GeneralConstructionTool tool)
testLikelihood
in interface RootAccess
public PatternInfo getLeftPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
getLeftPatternInfo
in interface FreeNode
public PatternInfo getRightPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
getRightPatternInfo
in interface FreeNode
public ConditionalProbabilityStore getExtendedConditionalProbabilities(double distance, FreeBranch caller, GeneralConstructionTool tool)
getExtendedConditionalProbabilities
in interface FreeNode
public ConditionalProbabilityStore getExtendedConditionalProbabilities(double distance, FreeBranch caller, UnconstrainedLikelihoodModel.External external, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool)
getExtendedConditionalProbabilities
in interface FreeNode
public FreeBranch extract(FreeBranch caller)
public Node buildPALNodeES(double branchLength_, FreeBranch caller)
buildPALNodeES
in interface FreeNode
public Node buildPALNodeBase(double branchLength_, FreeBranch caller)
buildPALNodeBase
in interface FreeNode
public ConditionalProbabilityStore getFlatConditionalProbabilities(FreeBranch caller, GeneralConstructionTool tool)
getFlatConditionalProbabilities
in interface FreeNode
public java.lang.String toString(FreeBranch caller)
public void setConnectingBranches(FreeBranch[] store, int number)
setConnectingBranches
in interface FreeNode
public boolean hasDirectConnection(FreeBranch query)
hasDirectConnection
in interface FreeNode
public void swapConnection(FreeBranch original, FreeBranch newConnection)
swapConnection
in interface FreeNode
public void swapConnection(FreeBranch original, FreeNode nodeToReplace, FreeBranch newConnection)
swapConnection
in interface FreeNode
public void getNonSubTreeComponents(java.util.ArrayList store, java.lang.Class componentType)
getNonSubTreeComponents
in class AbstractParentableConstrainedNode
public 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 to