Class GeneralConstructionTool


  • public class GeneralConstructionTool
    extends java.lang.Object
    • Constructor Detail

      • GeneralConstructionTool

        public GeneralConstructionTool​(ConstraintModel constraints,
                                       Alignment alignment)
        The constructor
        Parameters:
        alignment - the base alignment
        numberOfStates - the number of states
        numberOfCategories - the number of model classes
        freeCalculatorGenerator - 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 peer
        parent - The parent branch
        Returns:
        A FreeNode
      • constructFreshPatternInfo

        public PatternInfo constructFreshPatternInfo​(boolean binaryPattern)
      • allocateNextConnectionIndex

        public final int allocateNextConnectionIndex()
      • 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)