pal.treesearch
Class GeneralConstructionTool
java.lang.Object
pal.treesearch.GeneralConstructionTool
public class GeneralConstructionTool
- extends java.lang.Object
Method Summary |
UnconstrainedLikelihoodModel.Internal |
allocateNewFreeInternalCalculator()
|
int |
allocateNextConnectionIndex()
|
int |
build(PatternInfo beingBuilt,
PatternInfo left,
PatternInfo right)
|
PatternInfo |
constructFreshPatternInfo(boolean binaryPattern)
|
ConstrainedNode |
createConstrainedNode(Node peer,
ParentableConstrainedNode parent,
GeneralConstraintGroupManager.Store store,
GeneralConstraintGroupManager groupManager)
Create an appropriate constrained node given a peer, and it's parent node |
FreeNode |
createFreeNode(Node peer,
FreeBranch parent,
GeneralConstraintGroupManager.Store store)
Create an appropriate free node given a peer, and it's parent branch |
UnconstrainedLikelihoodModel.Leaf |
createNewFreeLeafCalculator(int[] patternStateMatchup,
int numberOfPatterns)
|
RootAccess |
createRootAccess(Node baseTree,
GeneralConstraintGroupManager.Store store)
|
DataType |
getDataType()
|
java.lang.String[] |
getLeafLabelSet(Node peer)
A horibly inefficient way of doing things. |
void |
getLeafLabelSet(Node peer,
java.util.ArrayList al)
|
int |
getNumberOfSites()
|
int |
getNumberOfStates()
|
int[] |
getSequence(java.lang.String name)
Get the sequence data for a particular OTU |
ConditionalProbabilityStore |
newConditionalProbabilityStore(boolean isForLeaf)
|
UnconstrainedLikelihoodModel.External |
obtainFreeExternalCalculator()
|
ConditionalProbabilityStore |
obtainTempConditionalProbabilityStore()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
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)