org.openrdf.query.algebra.evaluation.impl
Class EvaluationStatistics.CardinalityCalculator

java.lang.Object
  extended by org.openrdf.query.algebra.helpers.QueryModelVisitorBase<RuntimeException>
      extended by org.openrdf.query.algebra.evaluation.impl.EvaluationStatistics.CardinalityCalculator
All Implemented Interfaces:
QueryModelVisitor<RuntimeException>
Direct Known Subclasses:
MemoryStoreConnection.MemEvaluationStatistics.MemCardinalityCalculator
Enclosing class:
EvaluationStatistics

protected static class EvaluationStatistics.CardinalityCalculator
extends QueryModelVisitorBase<RuntimeException>


Field Summary
protected  double cardinality
           
 
Constructor Summary
protected EvaluationStatistics.CardinalityCalculator()
           
 
Method Summary
protected  int countConstantVars(Iterable<Var> vars)
           
 double getCardinality()
           
protected  double getCardinality(StatementPattern sp)
           
 void meet(EmptySet node)
           
 void meet(Join node)
           
 void meet(LeftJoin node)
           
 void meet(SingletonSet node)
           
 void meet(StatementPattern sp)
           
protected  void meetBinaryTupleOperator(BinaryTupleOperator node)
          Method called by all meet methods with a BinaryTupleOperator node as argument.
protected  void meetNode(QueryModelNode node)
          Method called by all of the other meet methods that are not overridden in subclasses.
protected  void meetUnaryTupleOperator(UnaryTupleOperator node)
          Method called by all meet methods with a UnaryTupleOperator node as argument.
 
Methods inherited from class org.openrdf.query.algebra.helpers.QueryModelVisitorBase
meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetOther, meetSubQueryValueOperator, meetUnaryValueOperator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cardinality

protected double cardinality
Constructor Detail

EvaluationStatistics.CardinalityCalculator

protected EvaluationStatistics.CardinalityCalculator()
Method Detail

getCardinality

public double getCardinality()

meet

public void meet(EmptySet node)
Specified by:
meet in interface QueryModelVisitor<RuntimeException>
Overrides:
meet in class QueryModelVisitorBase<RuntimeException>

meet

public void meet(SingletonSet node)
Specified by:
meet in interface QueryModelVisitor<RuntimeException>
Overrides:
meet in class QueryModelVisitorBase<RuntimeException>

meet

public void meet(StatementPattern sp)
Specified by:
meet in interface QueryModelVisitor<RuntimeException>
Overrides:
meet in class QueryModelVisitorBase<RuntimeException>

getCardinality

protected double getCardinality(StatementPattern sp)

countConstantVars

protected int countConstantVars(Iterable<Var> vars)

meet

public void meet(Join node)
Specified by:
meet in interface QueryModelVisitor<RuntimeException>
Overrides:
meet in class QueryModelVisitorBase<RuntimeException>

meet

public void meet(LeftJoin node)
Specified by:
meet in interface QueryModelVisitor<RuntimeException>
Overrides:
meet in class QueryModelVisitorBase<RuntimeException>

meetBinaryTupleOperator

protected void meetBinaryTupleOperator(BinaryTupleOperator node)
Description copied from class: QueryModelVisitorBase
Method called by all meet methods with a BinaryTupleOperator node as argument. Forwards the call to #meetTupleExpr by default.

Overrides:
meetBinaryTupleOperator in class QueryModelVisitorBase<RuntimeException>
Parameters:
node - The node that is being visited.

meetUnaryTupleOperator

protected void meetUnaryTupleOperator(UnaryTupleOperator node)
Description copied from class: QueryModelVisitorBase
Method called by all meet methods with a UnaryTupleOperator node as argument. Forwards the call to #meetTupleExpr by default.

Overrides:
meetUnaryTupleOperator in class QueryModelVisitorBase<RuntimeException>
Parameters:
node - The node that is being visited.

meetNode

protected void meetNode(QueryModelNode node)
Description copied from class: QueryModelVisitorBase
Method called by all of the other meet methods that are not overridden in subclasses. This method can be overridden in subclasses to define default behaviour when visiting nodes. The default behaviour of this method is to visit the node's children.

Overrides:
meetNode in class QueryModelVisitorBase<RuntimeException>
Parameters:
node - The node that is being visited.


Copyright © 2001-2008 Aduna. All Rights Reserved.