Class IndelAligner<T>

java.lang.Object
ca.phon.alignment.IndelAligner<T>
Type Parameters:
T -
All Implemented Interfaces:
Aligner<T>
Direct Known Subclasses:
PhoneAligner, SyllableAligner

public abstract class IndelAligner<T> extends Object implements Aligner<T>
  • Constructor Details

    • IndelAligner

      public IndelAligner()
  • Method Details

    • costSubstitute

      protected abstract int costSubstitute(T ele1, T ele2)
      Return the similarity between two elements
      Parameters:
      ele1 -
      ele2 -
      Returns:
    • costSkip

      protected abstract int costSkip(T ele)
    • calculateAlignment

      public AlignmentMap<T> calculateAlignment(T[] top, T[] bottom)
      Description copied from interface: Aligner
      Calculate the alignment. Alignment calculation is determined by implementation. See global vs local alignment.
      Specified by:
      calculateAlignment in interface Aligner<T>
      Returns:
      the alignment map
    • retrieveAlignment

      protected Integer[][] retrieveAlignment(T[] top, T[] bottom, int i, int j, int tally, int[][] matrix, Stack<Integer> tp, Stack<Integer> ap, int score)
      Get the alignment from the completed matrix
      Parameters:
      top - top elements
      bottom - bottom elements
      i - the width of the matrix
      j - the height of the matrix
      tally - the total score accumulated in at each setp of the recursion
      tp - the stack used to store the target alignment
      ap - the stack used to store the actual alignment
      score -
      Matrix - the completed dynamic algorithm
    • getAlignmentMap

      public AlignmentMap<T> getAlignmentMap()
      Description copied from interface: Aligner
      Returns the AlignmentMap calculated during the last call to 'calculateAlignment'. Undefined if calculateAlignment was not called.
      Specified by:
      getAlignmentMap in interface Aligner<T>
      Returns:
      alignment map