PatternMatcher

motif

## Class PatternMatcher

- java.lang.Object
- - motif.PatternMatcher

-     public class PatternMatcher
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.Double[]` | `durations`
    `private static PatternMatcher` | `instance`
    `private java.util.ArrayList<java.lang.Double>` | `postIntervals`
    `private java.util.ArrayList<java.lang.Double>` | `preIntervals`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PatternMatcher(java.util.ArrayList<java.lang.Double> postIntervals, java.util.ArrayList<java.lang.Double> preIntervals, IPhrase selectedIPhrase)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `private static IMotif` | `createMotif(java.lang.String name, INote[] motifArray, int noteIndex, IPhrase selectedIPhrase)`
    `private static IMotif` | `createMotif(java.lang.String name, INote[] motifArray, int noteIndex, IPhrase selectedIPhrase, java.lang.String type)`
    `double` | `getDurations(int index)`
    `double` | `getExtendedPostInterval(int index)`
    `double` | `getExtendedPreInterval(int index)`
    `static PatternMatcher` | `getInstance()`
    `static java.util.ArrayList<IMotif>` | `match(java.util.ArrayList<java.lang.Double> postIntervals, java.util.ArrayList<java.lang.Double> preIntervals, java.util.HashMap<java.lang.Double[],java.lang.Integer> intervalPatterns, IPhrase selectedIPhrase, MotifDetector detector)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### postIntervals

          private java.util.ArrayList<java.lang.Double> postIntervals

    - #### preIntervals

          private java.util.ArrayList<java.lang.Double> preIntervals

    - #### instance

          private static PatternMatcher instance

    - #### durations

          private java.lang.Double[] durations

  - ### Constructor Detail

    - #### PatternMatcher

          public PatternMatcher(java.util.ArrayList<java.lang.Double> postIntervals,
                        java.util.ArrayList<java.lang.Double> preIntervals,
                        IPhrase selectedIPhrase)

  - ### Method Detail

    - #### getInstance

          public static PatternMatcher getInstance()

    - #### getDurations

          public double getDurations(int index)

    - #### getExtendedPostInterval

          public double getExtendedPostInterval(int index)

    - #### getExtendedPreInterval

          public double getExtendedPreInterval(int index)

    - #### match

          public static java.util.ArrayList<IMotif> match(java.util.ArrayList<java.lang.Double> postIntervals,
                                          java.util.ArrayList<java.lang.Double> preIntervals,
                                          java.util.HashMap<java.lang.Double[],java.lang.Integer> intervalPatterns,
                                          IPhrase selectedIPhrase,
                                          MotifDetector detector)

    - #### createMotif

          private static IMotif createMotif(java.lang.String name,
                           INote[] motifArray,
                           int noteIndex,
                           IPhrase selectedIPhrase,
                           java.lang.String type)

    - #### createMotif

          private static IMotif createMotif(java.lang.String name,
                           INote[] motifArray,
                           int noteIndex,
                           IPhrase selectedIPhrase)