Package pal.treesearch
Class ConstrainedLeafNode
- java.lang.Object
-
- pal.treesearch.AbstractLeafNode
-
- pal.treesearch.ConstrainedLeafNode
-
- All Implemented Interfaces:
ConstrainedNode,GeneralTreeComponent
public class ConstrainedLeafNode extends AbstractLeafNode implements ConstrainedNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface pal.treesearch.ConstrainedNode
ConstrainedNode.HeightAdjustment
-
-
Constructor Summary
Constructors Constructor Description ConstrainedLeafNode(ParentableConstrainedNode parentNode, Node peer, double height, GeneralConstructionTool tool, ConstraintModel.GroupManager parentGroup)
-
Method Summary
-
Methods inherited from class pal.treesearch.AbstractLeafNode
createNewConstrainedLeafCalculator, createNewFreeLeafCalculator, getLabel, getNumberOfPatterns, getPatternInfo
-
-
-
-
Constructor Detail
-
ConstrainedLeafNode
public ConstrainedLeafNode(ParentableConstrainedNode parentNode, Node peer, double height, GeneralConstructionTool tool, ConstraintModel.GroupManager parentGroup)
-
-
Method Detail
-
recursivelySetParentPivot
public void recursivelySetParentPivot(PivotNode parentPivot)
- Specified by:
recursivelySetParentPivotin interfaceConstrainedNode
-
setupInternalNodeHeights
public void setupInternalNodeHeights(ConstraintModel.GroupManager groupConstraints)
- Specified by:
setupInternalNodeHeightsin interfaceConstrainedNode
-
getMinOriginalDescendentLeafHeight
public double getMinOriginalDescendentLeafHeight()
- Specified by:
getMinOriginalDescendentLeafHeightin interfaceConstrainedNode
-
getMaxOriginalDescendentLeafHeight
public double getMaxOriginalDescendentLeafHeight()
- Specified by:
getMaxOriginalDescendentLeafHeightin interfaceConstrainedNode
-
getLeftChild
public ConstrainedNode getLeftChild()
Returns null as we can't have children...- Specified by:
getLeftChildin interfaceConstrainedNode- Returns:
- null
-
getRightChild
public ConstrainedNode getRightChild()
- Specified by:
getRightChildin interfaceConstrainedNode
-
recursivelyAdjustNodeHeight
public void recursivelyAdjustNodeHeight(ConstrainedNode.HeightAdjustment heightDelta)
- Specified by:
recursivelyAdjustNodeHeightin interfaceConstrainedNode
-
toStringHeights
public java.lang.String toStringHeights()
- Specified by:
toStringHeightsin interfaceConstrainedNode
-
toStringLengths
public java.lang.String toStringLengths(double parentHeight)
- Specified by:
toStringLengthsin interfaceConstrainedNode
-
getMinimumDirectChildDistance
public double getMinimumDirectChildDistance()
- Specified by:
getMinimumDirectChildDistancein interfaceConstrainedNode- Returns:
- the minum distance to a child or zero if no children
-
buildDescendentPALNodeBase
public Node buildDescendentPALNodeBase()
Description copied from interface:ConstrainedNodeBuild node model base units (eg years)- Specified by:
buildDescendentPALNodeBasein interfaceConstrainedNode- Returns:
- A normal PAL node
-
buildDescendentPALNodeES
public final Node buildDescendentPALNodeES(ConstraintModel.GroupManager groupManager)
Description copied from interface:ConstrainedNodeBuild node with Expected Substitution Units- Specified by:
buildDescendentPALNodeESin interfaceConstrainedNode- Parameters:
groupManager- The constraints object to do the conversion with- Returns:
- A normal PAL node
-
getMinimumLeafChildSeperation
public final double getMinimumLeafChildSeperation(double parentHeight)
- Specified by:
getMinimumLeafChildSeperationin interfaceConstrainedNode
-
rebuildDescendentPattern
public void rebuildDescendentPattern(GeneralConstructionTool tool)
-
getDescendentPatternInfo
public PatternInfo getDescendentPatternInfo(GeneralConstructionTool tool)
- Specified by:
getDescendentPatternInfoin interfaceConstrainedNode
-
getSubTreeComponents
public void getSubTreeComponents(java.util.ArrayList store, java.lang.Class componentType)- Specified by:
getSubTreeComponentsin interfaceConstrainedNode
-
getNonSubTreeComponents
public void getNonSubTreeComponents(java.util.ArrayList store, java.lang.Class componentType)- Specified by:
getNonSubTreeComponentsin interfaceConstrainedNode
-
getAllComponents
public void getAllComponents(java.util.ArrayList store, java.lang.Class componentType)- Specified by:
getAllComponentsin interfaceGeneralTreeComponent
-
getNodeHeight
public final double getNodeHeight()
- Specified by:
getNodeHeightin interfaceConstrainedNode
-
getMinimumChildSeperation
public double getMinimumChildSeperation(double currentSeperation)
- Specified by:
getMinimumChildSeperationin interfaceConstrainedNode
-
obtainLeafInformation
public void obtainLeafInformation(HeightInformationUser user)
Description copied from interface:ConstrainedNodeObtain information regarding the current state of the leaf heights (called when first constructed). The resulting heights will, for exampled, be averaged across components and then used as the starting height values (see setLeafHeights...())- Specified by:
obtainLeafInformationin interfaceConstrainedNode- Parameters:
user- An object that uses the height information
-
getDescendentExtendedConditionals
public ConditionalProbabilityStore getDescendentExtendedConditionals(double extensionHeight, GeneralConstructionTool tool, boolean allowCaching)
- Specified by:
getDescendentExtendedConditionalsin interfaceConstrainedNode
-
getDescendentExtendedConditionalsWithAdjustedInternalHeights
public ConditionalProbabilityStore getDescendentExtendedConditionalsWithAdjustedInternalHeights(double extensionHeight, GeneralConstructionTool tool, ConstrainedNode.HeightAdjustment internalNodeHeightAdjuster, boolean allowCaching)
- Specified by:
getDescendentExtendedConditionalsWithAdjustedInternalHeightsin interfaceConstrainedNode
-
getDescendentFlatConditionals
public ConditionalProbabilityStore getDescendentFlatConditionals(GeneralConstructionTool tool, boolean allowCaching)
- Specified by:
getDescendentFlatConditionalsin interfaceConstrainedNode
-
testLikelihood
public void testLikelihood(GeneralConstructionTool tool)
- Specified by:
testLikelihoodin interfaceConstrainedNode
-
toString
public java.lang.String toString(FreeBranch caller)
-
-