Package pal.alignment

Class AlignmentBuilder

java.lang.Object
pal.alignment.AlignmentBuilder

public class AlignmentBuilder extends Object
A class for the gradual construction of an alignment. To supersede simular classes hidden away in PAL History
  • 25/11/2003 - Created
Version:
$Id: AlignmentBuilder.java,v 1.1 2003/11/25 01:06:21 matt Exp $
Author:
Matthew Goode
  • Constructor Details

    • AlignmentBuilder

      public AlignmentBuilder(int initialCapacity)
      The constructor
      Parameters:
      initialCapacity - The initial amount of space to allocate for sequence storage (dynamically adjusts if number of sequences exceeds capacity)
  • Method Details

    • clearAll

      public void clearAll()
      Remove all currently stored sequences.
    • generateAlignment

      public Alignment generateAlignment(DataType dt)
      Build an alignment based on sequences stored.
      Parameters:
      dt - The datatype of the sequence data
      Returns:
      The generated alignment
    • addSequence

      public void addSequence(int[] states, String name)
      Add sequence data to store
      Parameters:
      states - The states of the sequence (builder assumes all state arrays are equal length)
      name - The name of the sequence