Package pal.treesearch
Class GeneralConstructionTool
- java.lang.Object
-
- pal.treesearch.GeneralConstructionTool
-
public class GeneralConstructionTool extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description GeneralConstructionTool(ConstraintModel constraints, Alignment alignment)
The constructor
-
Method Summary
-
-
-
Constructor Detail
-
GeneralConstructionTool
public GeneralConstructionTool(ConstraintModel constraints, Alignment alignment)
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 Detail
-
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
public RootAccess createRootAccess(Node baseTree, GeneralConstraintGroupManager.Store store)
-
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
public PatternInfo constructFreshPatternInfo(boolean binaryPattern)
-
obtainTempConditionalProbabilityStore
public final ConditionalProbabilityStore obtainTempConditionalProbabilityStore()
-
newConditionalProbabilityStore
public final ConditionalProbabilityStore newConditionalProbabilityStore(boolean isForLeaf)
-
allocateNextConnectionIndex
public final int allocateNextConnectionIndex()
-
allocateNewFreeInternalCalculator
public UnconstrainedLikelihoodModel.Internal allocateNewFreeInternalCalculator()
-
obtainFreeExternalCalculator
public UnconstrainedLikelihoodModel.External obtainFreeExternalCalculator()
-
createNewFreeLeafCalculator
public UnconstrainedLikelihoodModel.Leaf createNewFreeLeafCalculator(int[] patternStateMatchup, int numberOfPatterns)
-
build
public int build(PatternInfo beingBuilt, PatternInfo left, PatternInfo right)
-
getDataType
public DataType getDataType()
-
getNumberOfSites
public final int getNumberOfSites()
-
getNumberOfStates
public int getNumberOfStates()
-
getSequence
public int[] getSequence(java.lang.String name)
Get the sequence data for a particular OTU- Parameters:
name
- The name of the OTU- Returns:
- the sequence data stored as integer values
- Throws:
java.lang.IllegalArgumentException
- if no such OTU with given name
-
getLeafLabelSet
public java.lang.String[] getLeafLabelSet(Node peer)
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
public void getLeafLabelSet(Node peer, java.util.ArrayList al)
-
-