org.eclipse.viatra.query.runtime.localsearch.planner.cost.impl

## Class IndexerBasedConstraintCostFunction

- java.lang.Object
- - org.eclipse.viatra.query.runtime.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction
  - - org.eclipse.viatra.query.runtime.localsearch.planner.cost.impl.IndexerBasedConstraintCostFunction

- All Implemented Interfaces:
    ICostFunction
  Direct Known Subclasses:
    HybridMatcherConstraintCostFunction

      public class IndexerBasedConstraintCostFunction
      extends StatisticsBasedConstraintCostFunction

  Cost function which calculates cost based on the cardinality of items in the runtime model, provided by the base indexer
  Since:
    1.4

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction

      `DEFAULT_COST, MAX_COST`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexerBasedConstraintCostFunction()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `countTuples(IConstraintEvaluationContext input, IInputKey supplierKey)`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction

      `_calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, apply, calculateBinaryExtendCost, calculateCost, calculateUnaryConstraintCost`

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

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

- - ### Constructor Detail

    - #### IndexerBasedConstraintCostFunction

          public IndexerBasedConstraintCostFunction()

  - ### Method Detail

    - #### countTuples

          public long countTuples(IConstraintEvaluationContext input,
                                  IInputKey supplierKey)

      Specified by:
        `countTuples` in class `StatisticsBasedConstraintCostFunction`