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

## Class ExpressionEval

- java.lang.Object
- - org.eclipse.viatra.query.runtime.localsearch.operations.extend.ExtendOperation<java.lang.Object>
  - - org.eclipse.viatra.query.runtime.localsearch.operations.extend.ExpressionEval

- All Implemented Interfaces:
    ISearchOperation

      public class ExpressionEval
      extends ExtendOperation<java.lang.Object>

  Calculates the result of an expression and stores it inside a variable for future reference.

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.localsearch.operations.extend.ExtendOperation

      `it, position`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExpressionEval(IExpressionEvaluator evaluator, java.util.Map<java.lang.String,java.lang.Integer> nameMap, int position)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.Integer>` | `getVariablePositions()`
    `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.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.localsearch.operations.extend.ExtendOperation

      `execute, onBacktrack`

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

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

- - ### Constructor Detail

    - #### ExpressionEval

          public ExpressionEval(IExpressionEvaluator evaluator,
                                java.util.Map<java.lang.String,java.lang.Integer> nameMap,
                                int position)

  - ### Method Detail

    - #### onInitialize

          public void onInitialize(MatchingFrame frame,
                                   ISearchContext context)
                            throws LocalSearchException

      Description copied from interface: `ISearchOperation`
      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.
      Throws:
        `LocalSearchException`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getVariablePositions

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

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