Package pal.treesearch
Class FreeLeafNode
java.lang.Object
pal.treesearch.AbstractLeafNode
pal.treesearch.FreeLeafNode
- All Implemented Interfaces:
FreeNode,GeneralTreeComponent
-
Constructor Summary
ConstructorsConstructorDescriptionFreeLeafNode(FreeBranch parentBranch, String id, GeneralConstructionTool tool) -
Method Summary
Modifier and TypeMethodDescriptionfinal NodebuildPALNode(double branchLength, FreeBranch caller) final NodebuildPALNodeBase(double branchLength, FreeBranch caller) final NodebuildPALNodeES(double branchLength, FreeBranch caller) extract(FreeBranch caller) Instruct the node to extract itself from the two connections that aren't the caller One of the other two connections will become redunant.final voidgetAllComponents(ArrayList store, Class componentType) voidgetAllComponents(ArrayList store, Class componentType, FreeBranch caller) Recurse to all neighbours but callervoidgetAllConnections(ArrayList store, FreeBranch caller) getExtendedConditionalProbabilities(double distance, FreeBranch callingBranch, UnconstrainedLikelihoodModel.External external, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool) getExtendedConditionalProbabilities(double distance, FreeBranch callingBranch, GeneralConstructionTool tool) getFlatConditionalProbabilities(FreeBranch callingBranch, UnconstrainedLikelihoodModel.External external, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool) getFlatConditionalProbabilities(FreeBranch caller, GeneralConstructionTool tool) getLeftBranch(FreeBranch caller) getLeftExtendedConditionalProbabilities(FreeBranch caller, UnconstrainedLikelihoodModel.External externalCalculator, ConditionalProbabilityStore resultStore) getLeftPatternInfo(GeneralConstructionTool tool, FreeBranch caller) getPatternInfo(GeneralConstructionTool tool, FreeBranch caller) getRightBranch(FreeBranch caller) getRightExtendedConditionalProbabilities(FreeBranch caller, UnconstrainedLikelihoodModel.External externalCalculator, ConditionalProbabilityStore resultStore) getRightPatternInfo(GeneralConstructionTool tool, FreeBranch caller) booleanhasConnection(FreeBranch fb, FreeBranch caller) booleanvoidmark()voidrebuildConnectionPatterns(GeneralConstructionTool tool, FreeBranch caller) intThis should only be called by another leaf node on the other end of the connection.voidsetConnectingBranches(FreeBranch[] store, int number) voidswapConnection(FreeBranch original, FreeBranch newConnection) Should not do anything but swap branches aroundvoidswapConnection(FreeBranch original, FreeNode nodeToReplace, FreeBranch newConnection) Should preserve tree integrityvoidtestLikelihood(FreeBranch caller, GeneralConstructionTool tool) toString(FreeBranch caller) voidMethods inherited from class pal.treesearch.AbstractLeafNode
createNewConstrainedLeafCalculator, createNewFreeLeafCalculator, getLabel, getNumberOfPatterns, getPatternInfo
-
Constructor Details
-
FreeLeafNode
-
-
Method Details
-
hasDirectConnection
- Specified by:
hasDirectConnectionin interfaceFreeNode
-
mark
public void mark() -
undoToMark
public void undoToMark() -
hasConnection
- Specified by:
hasConnectionin interfaceFreeNode
-
extract
Description copied from interface:FreeNodeInstruct the node to extract itself from the two connections that aren't the caller One of the other two connections will become redunant. -
getLeftExtendedConditionalProbabilities
public ConditionalProbabilityStore getLeftExtendedConditionalProbabilities(FreeBranch caller, UnconstrainedLikelihoodModel.External externalCalculator, ConditionalProbabilityStore resultStore) -
getRightExtendedConditionalProbabilities
public ConditionalProbabilityStore getRightExtendedConditionalProbabilities(FreeBranch caller, UnconstrainedLikelihoodModel.External externalCalculator, ConditionalProbabilityStore resultStore) -
getLeftPatternInfo
- Specified by:
getLeftPatternInfoin interfaceFreeNode- Returns:
- Get the pattern info for the relative left (from the caller's perspective), or null if not left pattern info
-
getRightPatternInfo
- Specified by:
getRightPatternInfoin interfaceFreeNode- Returns:
- Get the pattern info for the relative right (from the caller's perspective), or null if not right pattern info
-
setConnectingBranches
- Specified by:
setConnectingBranchesin interfaceFreeNode
-
testLikelihood
- Specified by:
testLikelihoodin interfaceFreeNode
-
swapConnection
Description copied from interface:FreeNodeShould not do anything but swap branches around- Specified by:
swapConnectionin interfaceFreeNode
-
swapConnection
Description copied from interface:FreeNodeShould preserve tree integrity- Specified by:
swapConnectionin interfaceFreeNode
-
getLeftBranch
- Specified by:
getLeftBranchin interfaceFreeNode- Returns:
- null (as not possible)
-
getRightBranch
- Specified by:
getRightBranchin interfaceFreeNode- Returns:
- null (as not possible)
-
getAllConnections
-
getPatternInfo
- Specified by:
getPatternInfoin interfaceFreeNode
-
rebuildConnectionPatterns
-
redirectRebuildPattern
This should only be called by another leaf node on the other end of the connection. In this case we don't have to do much (tree is two node tree) -
getFlatConditionalProbabilities
public final ConditionalProbabilityStore getFlatConditionalProbabilities(FreeBranch callingBranch, UnconstrainedLikelihoodModel.External external, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool) -
getFlatConditionalProbabilities
public final ConditionalProbabilityStore getFlatConditionalProbabilities(FreeBranch caller, GeneralConstructionTool tool) - Specified by:
getFlatConditionalProbabilitiesin interfaceFreeNode
-
getExtendedConditionalProbabilities
public ConditionalProbabilityStore getExtendedConditionalProbabilities(double distance, FreeBranch callingBranch, UnconstrainedLikelihoodModel.External external, ConditionalProbabilityStore resultStore, GeneralConstructionTool tool) - Specified by:
getExtendedConditionalProbabilitiesin interfaceFreeNode
-
getExtendedConditionalProbabilities
public ConditionalProbabilityStore getExtendedConditionalProbabilities(double distance, FreeBranch callingBranch, GeneralConstructionTool tool) - Specified by:
getExtendedConditionalProbabilitiesin interfaceFreeNode
-
buildPALNode
-
buildPALNodeES
- Specified by:
buildPALNodeESin interfaceFreeNode
-
buildPALNodeBase
- Specified by:
buildPALNodeBasein interfaceFreeNode
-
toString
-
getAllComponents
Description copied from interface:FreeNodeRecurse to all neighbours but caller- Specified by:
getAllComponentsin interfaceFreeNode
-
getAllComponents
- Specified by:
getAllComponentsin interfaceGeneralTreeComponent
-