net.ontopia.topicmaps.query.impl.utils
Class CostEstimator

java.lang.Object
  extended by net.ontopia.topicmaps.query.impl.utils.CostEstimator
Direct Known Subclasses:
PredicateDrivenCostEstimator, SimpleCostEstimator

public abstract class CostEstimator
extends java.lang.Object


Constructor Summary
CostEstimator()
           
 
Method Summary
abstract  int computeCost(java.util.Set context, AbstractClause clause, java.util.Set literalvars, java.lang.String rulename)
          INTERNAL: Computes the cost of evaluating the given clause in the given context of variable bindings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CostEstimator

public CostEstimator()
Method Detail

computeCost

public abstract int computeCost(java.util.Set context,
                                AbstractClause clause,
                                java.util.Set literalvars,
                                java.lang.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.

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).


Copyright © 2000-2012 Ontopia.