Package pal.treesearch
Class GeneralConstructionTool
java.lang.Object
pal.treesearch.GeneralConstructionTool
-
Constructor Summary
ConstructorsConstructorDescriptionGeneralConstructionTool(ConstraintModel constraints, Alignment alignment) The constructor -
Method Summary
Modifier and TypeMethodDescriptionfinal intintbuild(PatternInfo beingBuilt, PatternInfo left, PatternInfo right) constructFreshPatternInfo(boolean binaryPattern) createConstrainedNode(Node peer, ParentableConstrainedNode parent, GeneralConstraintGroupManager.Store store, GeneralConstraintGroupManager groupManager) Create an appropriate constrained node given a peer, and it's parent nodecreateFreeNode(Node peer, FreeBranch parent, GeneralConstraintGroupManager.Store store) Create an appropriate free node given a peer, and it's parent branchcreateNewFreeLeafCalculator(int[] patternStateMatchup, int numberOfPatterns) createRootAccess(Node baseTree, GeneralConstraintGroupManager.Store store) String[]getLeafLabelSet(Node peer) A horibly inefficient way of doing things.voidgetLeafLabelSet(Node peer, ArrayList al) final intintint[]getSequence(String name) Get the sequence data for a particular OTUnewConditionalProbabilityStore(boolean isForLeaf)
-
Constructor Details
-
GeneralConstructionTool
The constructor- Parameters:
alignment- the base alignmentnumberOfStates- the number of statesnumberOfCategories- the number of model classesfreeCalculatorGenerator- The generator for free calculation (may be null if no free components)constrainedCalcGenerator- The generator for constrained calculation (assuming a Molecular Clock, and may be null if no constrained components)
-
-
Method Details
-
createFreeNode
public FreeNode createFreeNode(Node peer, FreeBranch parent, GeneralConstraintGroupManager.Store store) Create an appropriate free node given a peer, and it's parent branch- Parameters:
peer- The normal PAL node peerparent- The parent branch- Returns:
- A FreeNode
-
createRootAccess
-
createConstrainedNode
public ConstrainedNode createConstrainedNode(Node peer, ParentableConstrainedNode parent, GeneralConstraintGroupManager.Store store, GeneralConstraintGroupManager groupManager) Create an appropriate constrained node given a peer, and it's parent node- Parameters:
peer- The normal PAL node peerparent- The parent node- Returns:
- A ConstrainedNode
-
constructFreshPatternInfo
-
obtainTempConditionalProbabilityStore
-
newConditionalProbabilityStore
-
allocateNextConnectionIndex
public final int allocateNextConnectionIndex() -
allocateNewFreeInternalCalculator
-
obtainFreeExternalCalculator
-
createNewFreeLeafCalculator
public UnconstrainedLikelihoodModel.Leaf createNewFreeLeafCalculator(int[] patternStateMatchup, int numberOfPatterns) -
build
-
getDataType
-
getNumberOfSites
public final int getNumberOfSites() -
getNumberOfStates
public int getNumberOfStates() -
getSequence
Get the sequence data for a particular OTU- Parameters:
name- The name of the OTU- Returns:
- the sequence data stored as integer values
- Throws:
IllegalArgumentException- if no such OTU with given name
-
getLeafLabelSet
A horibly inefficient way of doing things. Finds the leaf index for all leaves from the tree defined by the PAL node. Returns -1 if more than one index.- Parameters:
peer- the root of the sub tree- Returns:
- the common leaf index, of -1 if no common leaf index
-
getLeafLabelSet
-