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:
recursivelySetParentPivot
in interfaceConstrainedNode
-
setupInternalNodeHeights
public void setupInternalNodeHeights(ConstraintModel.GroupManager groupConstraints)
- Specified by:
setupInternalNodeHeights
in interfaceConstrainedNode
-
getMinOriginalDescendentLeafHeight
public double getMinOriginalDescendentLeafHeight()
- Specified by:
getMinOriginalDescendentLeafHeight
in interfaceConstrainedNode
-
getMaxOriginalDescendentLeafHeight
public double getMaxOriginalDescendentLeafHeight()
- Specified by:
getMaxOriginalDescendentLeafHeight
in interfaceConstrainedNode
-
getLeftChild
public ConstrainedNode getLeftChild()
Returns null as we can't have children...- Specified by:
getLeftChild
in interfaceConstrainedNode
- Returns:
- null
-
getRightChild
public ConstrainedNode getRightChild()
- Specified by:
getRightChild
in interfaceConstrainedNode
-
recursivelyAdjustNodeHeight
public void recursivelyAdjustNodeHeight(ConstrainedNode.HeightAdjustment heightDelta)
- Specified by:
recursivelyAdjustNodeHeight
in interfaceConstrainedNode
-
toStringHeights
public java.lang.String toStringHeights()
- Specified by:
toStringHeights
in interfaceConstrainedNode
-
toStringLengths
public java.lang.String toStringLengths(double parentHeight)
- Specified by:
toStringLengths
in interfaceConstrainedNode
-
getMinimumDirectChildDistance
public double getMinimumDirectChildDistance()
- Specified by:
getMinimumDirectChildDistance
in interfaceConstrainedNode
- Returns:
- the minum distance to a child or zero if no children
-
buildDescendentPALNodeBase
public Node buildDescendentPALNodeBase()
Description copied from interface:ConstrainedNode
Build node model base units (eg years)- Specified by:
buildDescendentPALNodeBase
in interfaceConstrainedNode
- Returns:
- A normal PAL node
-
buildDescendentPALNodeES
public final Node buildDescendentPALNodeES(ConstraintModel.GroupManager groupManager)
Description copied from interface:ConstrainedNode
Build node with Expected Substitution Units- Specified by:
buildDescendentPALNodeES
in 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:
getMinimumLeafChildSeperation
in interfaceConstrainedNode
-
rebuildDescendentPattern
public void rebuildDescendentPattern(GeneralConstructionTool tool)
-
getDescendentPatternInfo
public PatternInfo getDescendentPatternInfo(GeneralConstructionTool tool)
- Specified by:
getDescendentPatternInfo
in interfaceConstrainedNode
-
getSubTreeComponents
public void getSubTreeComponents(java.util.ArrayList store, java.lang.Class componentType)
- Specified by:
getSubTreeComponents
in interfaceConstrainedNode
-
getNonSubTreeComponents
public void getNonSubTreeComponents(java.util.ArrayList store, java.lang.Class componentType)
- Specified by:
getNonSubTreeComponents
in interfaceConstrainedNode
-
getAllComponents
public void getAllComponents(java.util.ArrayList store, java.lang.Class componentType)
- Specified by:
getAllComponents
in interfaceGeneralTreeComponent
-
getNodeHeight
public final double getNodeHeight()
- Specified by:
getNodeHeight
in interfaceConstrainedNode
-
getMinimumChildSeperation
public double getMinimumChildSeperation(double currentSeperation)
- Specified by:
getMinimumChildSeperation
in interfaceConstrainedNode
-
obtainLeafInformation
public void obtainLeafInformation(HeightInformationUser user)
Description copied from interface:ConstrainedNode
Obtain 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:
obtainLeafInformation
in interfaceConstrainedNode
- Parameters:
user
- An object that uses the height information
-
getDescendentExtendedConditionals
public ConditionalProbabilityStore getDescendentExtendedConditionals(double extensionHeight, GeneralConstructionTool tool, boolean allowCaching)
- Specified by:
getDescendentExtendedConditionals
in interfaceConstrainedNode
-
getDescendentExtendedConditionalsWithAdjustedInternalHeights
public ConditionalProbabilityStore getDescendentExtendedConditionalsWithAdjustedInternalHeights(double extensionHeight, GeneralConstructionTool tool, ConstrainedNode.HeightAdjustment internalNodeHeightAdjuster, boolean allowCaching)
- Specified by:
getDescendentExtendedConditionalsWithAdjustedInternalHeights
in interfaceConstrainedNode
-
getDescendentFlatConditionals
public ConditionalProbabilityStore getDescendentFlatConditionals(GeneralConstructionTool tool, boolean allowCaching)
- Specified by:
getDescendentFlatConditionals
in interfaceConstrainedNode
-
testLikelihood
public void testLikelihood(GeneralConstructionTool tool)
- Specified by:
testLikelihood
in interfaceConstrainedNode
-
toString
public java.lang.String toString(FreeBranch caller)
-
-