org.eclipse.viatra.cep.core.engine.compiler

## Class OptimizationPatterns

- java.lang.Object
- - org.eclipse.viatra.query.runtime.api.impl.BaseQueryGroup
  - - org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup
    - - org.eclipse.viatra.cep.core.engine.compiler.OptimizationPatterns

- All Implemented Interfaces:
    IQueryGroup

      public final class OptimizationPatterns
      extends BaseGeneratedPatternGroup

  A pattern group formed of all public patterns defined in optimizationPatterns.vql.

  Use the static instance as any `org.eclipse.viatra.query.runtime.api.IPatternGroup`, to conveniently prepare a VIATRA Query engine for matching all patterns originally defined in file optimizationPatterns.vql, in order to achieve better performance than one-by-one on-demand matcher initialization.

  From package org.eclipse.viatra.cep.core.engine.compiler, the group contains the definition of the following patterns:

  - epsilonTransition
  - equivalentTransitions
  - equivalentStates
  See Also:
    `IPatternGroup`

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup

      `querySpecifications`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `EpsilonTransitionQuerySpecification` | `getEpsilonTransition()`
    `EpsilonTransitionMatcher` | `getEpsilonTransition(ViatraQueryEngine engine)`
    `EquivalentStatesQuerySpecification` | `getEquivalentStates()`
    `EquivalentStatesMatcher` | `getEquivalentStates(ViatraQueryEngine engine)`
    `EquivalentTransitionsQuerySpecification` | `getEquivalentTransitions()`
    `EquivalentTransitionsMatcher` | `getEquivalentTransitions(ViatraQueryEngine engine)`
    `static OptimizationPatterns` | `instance()` Access the pattern group.

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup

      `getSpecifications`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseQueryGroup

      `prepare, prepare`

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

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

- - ### Method Detail

    - #### instance

          public static OptimizationPatterns instance()
                                               throws ViatraQueryException

      Access the pattern group.
      Returns:
        the singleton instance of the group
      Throws:
        `ViatraQueryException` - if there was an error loading the generated code of pattern specifications

    - #### getEpsilonTransition

          public EpsilonTransitionQuerySpecification getEpsilonTransition()
                                                                   throws ViatraQueryException

      Throws:
        `ViatraQueryException`

    - #### getEpsilonTransition

          public EpsilonTransitionMatcher getEpsilonTransition(ViatraQueryEngine engine)
                                                        throws ViatraQueryException

      Throws:
        `ViatraQueryException`

    - #### getEquivalentTransitions

          public EquivalentTransitionsQuerySpecification getEquivalentTransitions()
                                                                           throws ViatraQueryException

      Throws:
        `ViatraQueryException`

    - #### getEquivalentTransitions

          public EquivalentTransitionsMatcher getEquivalentTransitions(ViatraQueryEngine engine)
                                                                throws ViatraQueryException

      Throws:
        `ViatraQueryException`

    - #### getEquivalentStates

          public EquivalentStatesQuerySpecification getEquivalentStates()
                                                                 throws ViatraQueryException

      Throws:
        `ViatraQueryException`

    - #### getEquivalentStates

          public EquivalentStatesMatcher getEquivalentStates(ViatraQueryEngine engine)
                                                      throws ViatraQueryException

      Throws:
        `ViatraQueryException`