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, EVAL_UNWIND_EXTENSION_FACTOR, INVERSE_NAVIGATION_PENALTY_DEFAULT, INVERSE_NAVIGATION_PENALTY_GENERIC, MAX_COST
-
-
Constructor Summary
Constructors Constructor Description IndexerBasedConstraintCostFunction()
IndexerBasedConstraintCostFunction(double inverseNavigationPenalty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.Long>
projectionSize(IConstraintEvaluationContext input, IInputKey supplierKey, TupleMask groupMask, Accuracy requiredAccuracy)
Override this to provide custom statistics on edge/node counts.-
Methods inherited from class org.eclipse.viatra.query.runtime.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction
_calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, _calculateCost, apply, bucketSize, calculateBinaryCost, calculateBinaryExtendCost, calculateCost, calculateUnaryConstraintCost, countTuples, navigatesThroughFunctionalDependency, navigatesThroughFunctionalDependency, navigatesThroughFunctionalDependencyInverse
-
-
-
-
Method Detail
-
projectionSize
public java.util.Optional<java.lang.Long> projectionSize(IConstraintEvaluationContext input, IInputKey supplierKey, TupleMask groupMask, Accuracy requiredAccuracy)
Description copied from class:StatisticsBasedConstraintCostFunction
Override this to provide custom statistics on edge/node counts. New implementors shall implement this instead ofStatisticsBasedConstraintCostFunction.countTuples(IConstraintEvaluationContext, IInputKey)
- Overrides:
projectionSize
in classStatisticsBasedConstraintCostFunction
-
-