Class SimpleCostEstimator
- java.lang.Object
-
- net.ontopia.topicmaps.query.impl.utils.CostEstimator
-
- net.ontopia.topicmaps.query.impl.utils.SimpleCostEstimator
-
public class SimpleCostEstimator extends CostEstimator
-
-
Constructor Summary
Constructors Constructor Description SimpleCostEstimator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeCost(Set context, AbstractClause clause, Set literalvars, String rulename)
INTERNAL: Computes the cost of evaluating the given clause in the given context of variable bindings.
-
-
-
Method Detail
-
computeCost
public int computeCost(Set context, AbstractClause clause, Set literalvars, String rulename)
INTERNAL: Computes the cost of evaluating the given clause in the given context of variable bindings. The cost largely depends on the number of unbound variables in the clause.- Specified by:
computeCost
in classCostEstimator
- Parameters:
context
- A set of bound variables.clause
- The clause whose cost we want to compute.literalvars
- Contains the variables representing literals. Only an issue in rules.rulename
- The name of the current rule (so we can delay recursive evaluation).
-
-