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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstrainedLeafNode
public ConstrainedLeafNode(ParentableConstrainedNode parentNode,
Node peer,
double height,
GeneralConstructionTool tool,
ConstraintModel.GroupManager parentGroup)
recursivelySetParentPivot
public void recursivelySetParentPivot(PivotNode parentPivot)
- Specified by:
recursivelySetParentPivot in interface ConstrainedNode
setupInternalNodeHeights
public void setupInternalNodeHeights(ConstraintModel.GroupManager groupConstraints)
- Specified by:
setupInternalNodeHeights in interface ConstrainedNode
getMinOriginalDescendentLeafHeight
public double getMinOriginalDescendentLeafHeight()
- Specified by:
getMinOriginalDescendentLeafHeight in interface ConstrainedNode
getMaxOriginalDescendentLeafHeight
public double getMaxOriginalDescendentLeafHeight()
- Specified by:
getMaxOriginalDescendentLeafHeight in interface ConstrainedNode
getLeftChild
public ConstrainedNode getLeftChild()
- Returns null as we can't have children...
- Specified by:
getLeftChild in interface ConstrainedNode
- Returns:
- null
getRightChild
public ConstrainedNode getRightChild()
- Specified by:
getRightChild in interface ConstrainedNode
recursivelyAdjustNodeHeight
public void recursivelyAdjustNodeHeight(ConstrainedNode.HeightAdjustment heightDelta)
- Specified by:
recursivelyAdjustNodeHeight in interface ConstrainedNode
toStringHeights
public java.lang.String toStringHeights()
- Specified by:
toStringHeights in interface ConstrainedNode
toStringLengths
public java.lang.String toStringLengths(double parentHeight)
- Specified by:
toStringLengths in interface ConstrainedNode
getMinimumDirectChildDistance
public double getMinimumDirectChildDistance()
- Specified by:
getMinimumDirectChildDistance in interface ConstrainedNode
- 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 interface ConstrainedNode
- 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 interface ConstrainedNode
- 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 interface ConstrainedNode
rebuildDescendentPattern
public void rebuildDescendentPattern(GeneralConstructionTool tool)
getDescendentPatternInfo
public PatternInfo getDescendentPatternInfo(GeneralConstructionTool tool)
- Specified by:
getDescendentPatternInfo in interface ConstrainedNode
getSubTreeComponents
public void getSubTreeComponents(java.util.ArrayList store,
java.lang.Class componentType)
- Specified by:
getSubTreeComponents in interface ConstrainedNode
getNonSubTreeComponents
public void getNonSubTreeComponents(java.util.ArrayList store,
java.lang.Class componentType)
- Specified by:
getNonSubTreeComponents in interface ConstrainedNode
getAllComponents
public void getAllComponents(java.util.ArrayList store,
java.lang.Class componentType)
- Specified by:
getAllComponents in interface GeneralTreeComponent
getNodeHeight
public final double getNodeHeight()
- Specified by:
getNodeHeight in interface ConstrainedNode
getMinimumChildSeperation
public double getMinimumChildSeperation(double currentSeperation)
- Specified by:
getMinimumChildSeperation in interface ConstrainedNode
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 interface ConstrainedNode
- Parameters:
user - An object that uses the height information
getDescendentExtendedConditionals
public ConditionalProbabilityStore getDescendentExtendedConditionals(double extensionHeight,
GeneralConstructionTool tool,
boolean allowCaching)
- Specified by:
getDescendentExtendedConditionals in interface ConstrainedNode
getDescendentExtendedConditionalsWithAdjustedInternalHeights
public ConditionalProbabilityStore getDescendentExtendedConditionalsWithAdjustedInternalHeights(double extensionHeight,
GeneralConstructionTool tool,
ConstrainedNode.HeightAdjustment internalNodeHeightAdjuster,
boolean allowCaching)
- Specified by:
getDescendentExtendedConditionalsWithAdjustedInternalHeights in interface ConstrainedNode
getDescendentFlatConditionals
public ConditionalProbabilityStore getDescendentFlatConditionals(GeneralConstructionTool tool,
boolean allowCaching)
- Specified by:
getDescendentFlatConditionals in interface ConstrainedNode
testLikelihood
public void testLikelihood(GeneralConstructionTool tool)
- Specified by:
testLikelihood in interface ConstrainedNode
toString
public java.lang.String toString(FreeBranch caller)