Package pal.treesearch
Class FreeInternalNode
- java.lang.Object
-
- pal.treesearch.FreeInternalNode
-
- All Implemented Interfaces:
FreeNode
,GeneralTreeComponent
public class FreeInternalNode extends java.lang.Object implements FreeNode
-
-
Constructor Summary
Constructors Constructor Description FreeInternalNode(Node i, FreeBranch parentFreeBranch, GeneralConstructionTool tool, GeneralConstraintGroupManager.Store store)
-
Method Summary
-
-
-
Constructor Detail
-
FreeInternalNode
public FreeInternalNode(Node i, FreeBranch parentFreeBranch, GeneralConstructionTool tool, GeneralConstraintGroupManager.Store store)
-
-
Method Detail
-
mark
public void mark()
-
undoToMark
public void undoToMark()
-
hasDirectConnection
public boolean hasDirectConnection(FreeBranch c)
- Specified by:
hasDirectConnection
in interfaceFreeNode
-
hasConnection
public boolean hasConnection(FreeBranch c, FreeBranch caller)
- Specified by:
hasConnection
in interfaceFreeNode
-
testLikelihood
public void testLikelihood(FreeBranch caller, GeneralConstructionTool tool)
- Specified by:
testLikelihood
in interfaceFreeNode
-
setConnectingBranches
public void setConnectingBranches(FreeBranch[] store, int number)
- Specified by:
setConnectingBranches
in interfaceFreeNode
-
getLeftBranch
public FreeBranch getLeftBranch(FreeBranch caller)
- Specified by:
getLeftBranch
in interfaceFreeNode
-
getRightBranch
public FreeBranch getRightBranch(FreeBranch caller)
- Specified by:
getRightBranch
in interfaceFreeNode
-
extract
public FreeBranch extract(FreeBranch caller)
Description copied from interface:FreeNode
Instruct the node to extract itself from the two connections that aren't the caller One of the other two connections will become redunant.
-
swapConnection
public void swapConnection(FreeBranch original, FreeNode nodeToReplace, FreeBranch newConnection)
Description copied from interface:FreeNode
Should preserve tree integrity- Specified by:
swapConnection
in interfaceFreeNode
-
swapConnection
public void swapConnection(FreeBranch original, FreeBranch newConnection)
Description copied from interface:FreeNode
Should not do anything but swap branches around- Specified by:
swapConnection
in interfaceFreeNode
-
getPatternInfo
public PatternInfo getPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
- Specified by:
getPatternInfo
in interfaceFreeNode
-
buildPALNodeES
public Node buildPALNodeES(double branchLength, FreeBranch caller)
- Specified by:
buildPALNodeES
in interfaceFreeNode
-
buildPALNodeBase
public Node buildPALNodeBase(double branchLength, FreeBranch caller)
- Specified by:
buildPALNodeBase
in interfaceFreeNode
-
toString
public java.lang.String toString(FreeBranch caller)
-
getAllComponents
public void getAllComponents(java.util.ArrayList store, java.lang.Class componentType)
- Specified by:
getAllComponents
in interfaceGeneralTreeComponent
-
getAllComponents
public void getAllComponents(java.util.ArrayList store, java.lang.Class componentType, FreeBranch caller)
Description copied from interface:FreeNode
Recurse to all neighbours but caller- Specified by:
getAllComponents
in interfaceFreeNode
-
getLeftExtendedConditionalProbabilities
public ConditionalProbabilityStore getLeftExtendedConditionalProbabilities(FreeBranch callingConnection, UnconstrainedLikelihoodModel.External external, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool)
-
getRightExtendedConditionalProbabilities
public ConditionalProbabilityStore getRightExtendedConditionalProbabilities(FreeBranch callingConnection, UnconstrainedLikelihoodModel.External external, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool)
-
getLeftPatternInfo
public PatternInfo getLeftPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
- Specified by:
getLeftPatternInfo
in interfaceFreeNode
- Returns:
- Get the pattern info for the relative left (from the caller's perspective), or null if not left pattern info
-
getRightPatternInfo
public PatternInfo getRightPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
- Specified by:
getRightPatternInfo
in interfaceFreeNode
- Returns:
- Get the pattern info for the relative right (from the caller's perspective), or null if not right pattern info
-
getFlatConditionalProbabilities
public ConditionalProbabilityStore getFlatConditionalProbabilities(FreeBranch callerConnection, UnconstrainedLikelihoodModel.External externalCalculator, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool)
-
getFlatConditionalProbabilities
public ConditionalProbabilityStore getFlatConditionalProbabilities(FreeBranch callerConnection, GeneralConstructionTool tool)
- Specified by:
getFlatConditionalProbabilities
in interfaceFreeNode
-
getExtendedConditionalProbabilities
public ConditionalProbabilityStore getExtendedConditionalProbabilities(double distance, FreeBranch callerConnection, UnconstrainedLikelihoodModel.External externalCalculator, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool)
- Specified by:
getExtendedConditionalProbabilities
in interfaceFreeNode
-
getExtendedConditionalProbabilities
public ConditionalProbabilityStore getExtendedConditionalProbabilities(double distance, FreeBranch callerConnection, GeneralConstructionTool tool)
- Specified by:
getExtendedConditionalProbabilities
in interfaceFreeNode
-
-