org.eclipse.viatra.query.runtime.localsearch.operations

## Interface ISearchOperation

- All Known Subinterfaces:
    IIteratingSearchOperation
  All Known Implementing Classes:
    AbstractPositivePatternCallOperation, AggregatorCheck, AggregatorExtend, BinaryTransitiveClosureCheck, CheckConstant, CheckOperation, CheckPositivePatternCall, ContainmentCheck, CountCheck, CountOperation, ExpressionCheck, ExpressionEval, ExpressionEvalCheck, ExtendConstant, ExtendOperation, ExtendPositivePatternCall, ExtendToEStructuralFeatureSource, ExtendToEStructuralFeatureTarget, FrameInitializationCheck, InequalityCheck, InstanceOfClassCheck, InstanceOfDataTypeCheck, InstanceOfJavaClassCheck, IterateOverChildren, IterateOverContainers, IterateOverEClassInstances, IterateOverEDatatypeInstances, IterateOverEStructuralFeatureInstances, NACOperation, StructuralFeatureCheck

      public interface ISearchOperation

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `execute(MatchingFrame frame, ISearchContext context)`
    `java.util.List<java.lang.Integer>` | `getVariablePositions()`
    `void` | `onBacktrack(MatchingFrame frame, ISearchContext context)` After the execution of the operation failed and `execute(MatchingFrame, ISearchContext)` returns false, the onBacktrack callback is evaluated.
    `void` | `onInitialize(MatchingFrame frame, ISearchContext context)` During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin.

- - ### Method Detail

    - #### onInitialize

          void onInitialize(MatchingFrame frame,
                            ISearchContext context)
                     throws LocalSearchException

      During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin. Operations may use this method to initialize its internal data structures.
      Parameters:
        `frame` -
        `context` -
      Throws:
        `LocalSearchException`

    - #### onBacktrack

          void onBacktrack(MatchingFrame frame,
                           ISearchContext context)
                    throws LocalSearchException

      After the execution of the operation failed and `execute(MatchingFrame, ISearchContext)` returns false, the onBacktrack callback is evaluated. Operations may use this method to clean up any temporary structures, and make the operation ready for a new execution.
      Parameters:
        `frame` -
        `context` -
      Throws:
        `LocalSearchException`

    - #### execute

          boolean execute(MatchingFrame frame,
                          ISearchContext context)
                   throws LocalSearchException

      Parameters:
        `frame` -
        `context` -
      Returns:
        true if successful, or false if backtracking needed
      Throws:
        `LocalSearchException`

    - #### getVariablePositions

          java.util.List<java.lang.Integer> getVariablePositions()

      Returns:
        the ordered list of the variable numbers that are affected by the search operation