Class IndexerBasedConstraintCostFunction
java.lang.Object
tools.refinery.interpreter.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction
tools.refinery.interpreter.localsearch.planner.cost.impl.IndexerBasedConstraintCostFunction
- All Implemented Interfaces:
ICostFunction
- Direct Known Subclasses:
HybridMatcherConstraintCostFunction
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 tools.refinery.interpreter.localsearch.planner.cost.impl.StatisticsBasedConstraintCostFunction
DEFAULT_COST, EVAL_UNWIND_EXTENSION_FACTOR, INVERSE_NAVIGATION_PENALTY_DEFAULT, INVERSE_NAVIGATION_PENALTY_GENERIC, MAX_COST
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprojectionSize
(IConstraintEvaluationContext input, IInputKey supplierKey, TupleMask groupMask, Accuracy requiredAccuracy) Override this to provide custom statistics on edge/node counts.Methods inherited from class tools.refinery.interpreter.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
-
Constructor Details
-
IndexerBasedConstraintCostFunction
public IndexerBasedConstraintCostFunction() -
IndexerBasedConstraintCostFunction
public IndexerBasedConstraintCostFunction(double inverseNavigationPenalty) - Parameters:
inverseNavigationPenalty
-- Since:
- 2.1
-
-
Method Details
-
projectionSize
public Optional<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
-