Class FixedPoint

  • java.lang.Object
    • at.ofai.music.match.FixedPoint


  • public class FixedPoint
    extends java.lang.Object
    Maintains a list of fixed points through which all alignment paths must pass. This class assumes that the list of points has an unchangeable first and last element, corresponding to the beginnings and ends of both files. It is implemented as a doubly linked list.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected FixedPoint next 
      protected FixedPoint prev 
      protected int x 
      protected int y 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      FixedPoint insert(int x, int y)
      Inserts a new point into the list in sorted (ascending) order of both coordinates.
      static FixedPoint newList(int x1, int y1, int x2, int y2)
      This class assumes a list of points has an unchangeable first and last element, corresponding to the beginnings and ends of both files; this method creates and initialises such a list with the two end points.
      void remove()
      Remove the current point from the list containing it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • remove

        public void remove()
        Remove the current point from the list containing it. It is assumed that this point is not the first or last in the list.
      • insert

        public FixedPoint insert(int x,
                                 int y)
        Inserts a new point into the list in sorted (ascending) order of both coordinates. The new point will be rejected if it can not be inserted into the list such that both the x and y coordinates are monotonically non-decreasing.
        Parameters:
        x - The x-coordinate of the new point
        y - The y-coordinate of the new point
        Returns:
        Indicates whether the insertion was successful: it will be unsuccessful if the new point would make the list non-monotonic
      • newList

        public static FixedPoint newList(int x1,
                                         int y1,
                                         int x2,
                                         int y2)
        This class assumes a list of points has an unchangeable first and last element, corresponding to the beginnings and ends of both files; this method creates and initialises such a list with the two end points.
        Parameters:
        x1 - x-coordinate of the start point (usually 0)
        y1 - y-coordinate of the start point (usually 0)
        x2 - x-coordinate of the end point (usually length of file x)
        y2 - y-coordinate of the end point (usually length of file y)