Package pal.treesearch
Class FreeLeafNode
- java.lang.Object
-
- pal.treesearch.AbstractLeafNode
-
- pal.treesearch.FreeLeafNode
-
- All Implemented Interfaces:
FreeNode,GeneralTreeComponent
public class FreeLeafNode extends AbstractLeafNode implements FreeNode
-
-
Constructor Summary
Constructors Constructor Description FreeLeafNode(FreeBranch parentBranch, java.lang.String id, GeneralConstructionTool tool)
-
Method Summary
-
Methods inherited from class pal.treesearch.AbstractLeafNode
createNewConstrainedLeafCalculator, createNewFreeLeafCalculator, getLabel, getNumberOfPatterns, getPatternInfo
-
-
-
-
Constructor Detail
-
FreeLeafNode
public FreeLeafNode(FreeBranch parentBranch, java.lang.String id, GeneralConstructionTool tool)
-
-
Method Detail
-
hasDirectConnection
public boolean hasDirectConnection(FreeBranch fb)
- Specified by:
hasDirectConnectionin interfaceFreeNode
-
mark
public void mark()
-
undoToMark
public void undoToMark()
-
hasConnection
public boolean hasConnection(FreeBranch fb, FreeBranch caller)
- Specified by:
hasConnectionin interfaceFreeNode
-
extract
public FreeBranch extract(FreeBranch caller)
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
public PatternInfo getLeftPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
- 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
public PatternInfo getRightPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
- 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
public void setConnectingBranches(FreeBranch[] store, int number)
- Specified by:
setConnectingBranchesin interfaceFreeNode
-
testLikelihood
public void testLikelihood(FreeBranch caller, GeneralConstructionTool tool)
- Specified by:
testLikelihoodin interfaceFreeNode
-
swapConnection
public void swapConnection(FreeBranch original, FreeBranch newConnection)
Description copied from interface:FreeNodeShould not do anything but swap branches around- Specified by:
swapConnectionin interfaceFreeNode
-
swapConnection
public void swapConnection(FreeBranch original, FreeNode nodeToReplace, FreeBranch newConnection)
Description copied from interface:FreeNodeShould preserve tree integrity- Specified by:
swapConnectionin interfaceFreeNode
-
getLeftBranch
public FreeBranch getLeftBranch(FreeBranch caller)
- Specified by:
getLeftBranchin interfaceFreeNode- Returns:
- null (as not possible)
-
getRightBranch
public FreeBranch getRightBranch(FreeBranch caller)
- Specified by:
getRightBranchin interfaceFreeNode- Returns:
- null (as not possible)
-
getAllConnections
public void getAllConnections(java.util.ArrayList store, FreeBranch caller)
-
getPatternInfo
public PatternInfo getPatternInfo(GeneralConstructionTool tool, FreeBranch caller)
- Specified by:
getPatternInfoin interfaceFreeNode
-
rebuildConnectionPatterns
public void rebuildConnectionPatterns(GeneralConstructionTool tool, FreeBranch caller)
-
redirectRebuildPattern
public int redirectRebuildPattern(GeneralConstructionTool tool)
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
public final Node buildPALNode(double branchLength, FreeBranch caller)
-
buildPALNodeES
public final Node buildPALNodeES(double branchLength, FreeBranch caller)
- Specified by:
buildPALNodeESin interfaceFreeNode
-
buildPALNodeBase
public final Node buildPALNodeBase(double branchLength, FreeBranch caller)
- Specified by:
buildPALNodeBasein interfaceFreeNode
-
toString
public java.lang.String toString(FreeBranch caller)
-
getAllComponents
public void getAllComponents(java.util.ArrayList store, java.lang.Class componentType, FreeBranch caller)Description copied from interface:FreeNodeRecurse to all neighbours but caller- Specified by:
getAllComponentsin interfaceFreeNode
-
getAllComponents
public final void getAllComponents(java.util.ArrayList store, java.lang.Class componentType)- Specified by:
getAllComponentsin interfaceGeneralTreeComponent
-
-