Class SeriesWarpPath

  • All Implemented Interfaces:
    IAlignmentPath

    public class SeriesWarpPath
    extends Object
    implements IAlignmentPath
    Class that holds the warping information for matching points in one series to points in another series. Note that there is no guarantee that all points in either series will have a match in the other.
    Author:
    Thomas Abeel, Stan Salvador, stansalvador@hotmail.com, refactored by Dustin Kempton, Data Mining Lab, Georgia State University
    • Constructor Summary

      Constructors 
      Constructor Description
      SeriesWarpPath()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFirst​(int i, int j)
      Method that adds a mapping from a point at index i in series I to a point j in series J at the beginning of the mapping path.
      void addLast​(int i, int j)
      Method that adds a mapping from a pint at index i in series I to a point j in series J at the end of the mapping path.
      ColMajorCell get​(int index)
      Method that gets the mapping of index i (column) to index j (row) at the index position of this mapping path.
      Iterator<ColMajorCell> getMapping()
      Method that gets an iterator for the mappings of index i (column) to index j (row) in this mapping path.
      List<Integer> getMatchingIndexesForI​(int i)
      Method that gets a list of indices for points in series J that are mapped to index i in series I.
      List<Integer> getMatchingIndexesForJ​(int j)
      Method that gets a list of indices for points in series I that are mapped to index j in series J.
      int maxI()
      Method that returns the maximum index in series I that is contained within this mapping.
      int maxJ()
      Method that returns the maximum index in series J that is contained within this mapping.
      int minI()
      Method that returns the minimum index in series I that is contained within this mapping
      int minJ()
      Method that returns the minimum index in series J that is contained within this mapping.
      int size()
      Method that returns the number of point mappings that are contained within this object.
    • Constructor Detail

      • SeriesWarpPath

        public SeriesWarpPath()
    • Method Detail

      • size

        public int size()
        Description copied from interface: IAlignmentPath
        Method that returns the number of point mappings that are contained within this object.
        Specified by:
        size in interface IAlignmentPath
        Returns:
        The number of point mappings in this object
      • minI

        public int minI()
        Description copied from interface: IAlignmentPath
        Method that returns the minimum index in series I that is contained within this mapping
        Specified by:
        minI in interface IAlignmentPath
        Returns:
        The minimum index of series I contained in this mapping
      • minJ

        public int minJ()
        Description copied from interface: IAlignmentPath
        Method that returns the minimum index in series J that is contained within this mapping.
        Specified by:
        minJ in interface IAlignmentPath
        Returns:
        The minimum index of series J contained in this mapping
      • maxI

        public int maxI()
        Description copied from interface: IAlignmentPath
        Method that returns the maximum index in series I that is contained within this mapping.
        Specified by:
        maxI in interface IAlignmentPath
        Returns:
        The maximum index in series I contained in this mapping
      • maxJ

        public int maxJ()
        Description copied from interface: IAlignmentPath
        Method that returns the maximum index in series J that is contained within this mapping.
        Specified by:
        maxJ in interface IAlignmentPath
        Returns:
        The maximum index in series J contained in this mapping
      • addFirst

        public void addFirst​(int i,
                             int j)
        Description copied from interface: IAlignmentPath
        Method that adds a mapping from a point at index i in series I to a point j in series J at the beginning of the mapping path. Both i and j must be an index that is lower than or equal to indexes that were used as the previous first entry in the mapping.
        Specified by:
        addFirst in interface IAlignmentPath
        Parameters:
        i - Index of series I that is to be mapped
        j - Index of series J that is to be mapped
      • addLast

        public void addLast​(int i,
                            int j)
        Description copied from interface: IAlignmentPath
        Method that adds a mapping from a pint at index i in series I to a point j in series J at the end of the mapping path. Both i and j must be an indexes that is greater than or equal to indexes that were used as the previous last entry in the mapping.
        Specified by:
        addLast in interface IAlignmentPath
        Parameters:
        i - Index of series I that is to be mapped
        j - Index of series J that is to be mapped
      • getMatchingIndexesForI

        public List<Integer> getMatchingIndexesForI​(int i)
        Description copied from interface: IAlignmentPath
        Method that gets a list of indices for points in series J that are mapped to index i in series I. Index i must be mapped to at least 1 point in J, otherwise an exception is thrown.
        Specified by:
        getMatchingIndexesForI in interface IAlignmentPath
        Parameters:
        i - Index in series I to get matching mapped indices in series J for
        Returns:
        List of indices in J that are mapped to the input index of I
      • getMatchingIndexesForJ

        public List<Integer> getMatchingIndexesForJ​(int j)
        Description copied from interface: IAlignmentPath
        Method that gets a list of indices for points in series I that are mapped to index j in series J. Index j must be mapped to at least 1 point in I, otherwise an exception is thrown.
        Specified by:
        getMatchingIndexesForJ in interface IAlignmentPath
        Parameters:
        j - Index in series J to get matching mapped indices in series I for
        Returns:
        List of indices in I that are mapped to the input index of J
      • get

        public ColMajorCell get​(int index)
        Description copied from interface: IAlignmentPath
        Method that gets the mapping of index i (column) to index j (row) at the index position of this mapping path.
        Specified by:
        get in interface IAlignmentPath
        Parameters:
        index - The index in the mapping path to return the mapping for
        Returns:
        The mapping of index i (column) to index j (row) at the indicated index position of this mapping path
      • getMapping

        public Iterator<ColMajorCell> getMapping()
        Description copied from interface: IAlignmentPath
        Method that gets an iterator for the mappings of index i (column) to index j (row) in this mapping path.
        Specified by:
        getMapping in interface IAlignmentPath
        Returns:
        An iterator of the mappings of index i (column) to index j (row)