org.eclipse.rdf4j.query.algebra.evaluation.impl

## Class EvaluationStatistics.CardinalityCalculator

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor<RuntimeException>
  - - org.eclipse.rdf4j.query.algebra.evaluation.impl.EvaluationStatistics.CardinalityCalculator

- All Implemented Interfaces:
    QueryModelVisitor<RuntimeException>
  Direct Known Subclasses:
    TupleFunctionEvaluationStatistics.TupleFunctionCardinalityCalculator
  Enclosing class:
    EvaluationStatistics

      protected static class EvaluationStatistics.CardinalityCalculator
      extends AbstractQueryModelVisitor<RuntimeException>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected double` | `cardinality`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CardinalityCalculator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `countConstantVars(Iterable<Var> vars)`
    `double` | `getCardinality()`
    `protected double` | `getCardinality(double varCardinality, Collection<Var> vars)`
    `protected double` | `getCardinality(double varCardinality, Var var)`
    `protected double` | `getCardinality(StatementPattern sp)`
    `protected double` | `getContextCardinality(StatementPattern sp)` Override this if you are able to determine the cardinality based not only on the contextVar itself but also the other vars (e.g.
    `protected double` | `getContextCardinality(Var var)`
    `protected double` | `getObjectCardinality(StatementPattern sp)` Override this if you are able to determine the cardinality based not only on the objectVar itself but also the other vars (e.g.
    `protected double` | `getObjectCardinality(Var var)`
    `protected double` | `getPredicateCardinality(StatementPattern sp)` Override this if you are able to determine the cardinality based not only on the predicateVar itself but also the other vars (e.g.
    `protected double` | `getPredicateCardinality(Var var)`
    `protected double` | `getSubjectCardinality(StatementPattern sp)` Override this if you are able to determine the cardinality based not only on the subjectVar itself but also the other vars (e.g.
    `protected double` | `getSubjectCardinality(Var var)`
    `void` | `meet(ArbitraryLengthPath node)`
    `void` | `meet(BindingSetAssignment node)`
    `void` | `meet(EmptySet node)`
    `void` | `meet(Join node)`
    `void` | `meet(LeftJoin node)`
    `void` | `meet(Service node)`
    `void` | `meet(SingletonSet node)`
    `void` | `meet(StatementPattern sp)`
    `void` | `meet(TripleRef tripleRef)`
    `void` | `meet(ZeroLengthPath node)`
    `protected void` | `meetBinaryTupleOperator(BinaryTupleOperator node)` Method called by all `meet` methods with a `BinaryTupleOperator` node as argument.
    `protected void` | `meetExternalSet(ExternalSet node)`
    `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.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor

      `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, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meet, meetBinaryValueOperator, meetCompareSubQueryValueOperator, meetNAryValueOperator, meetOther, meetSubQueryValueOperator, meetUnaryValueOperator, meetUpdateExpr`

    - ### 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

    - #### CardinalityCalculator

          protected CardinalityCalculator()

  - ### Method Detail

    - #### getCardinality

          public double getCardinality()

    - #### meet

          public void meet(EmptySet node)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meet

          public void meet(SingletonSet node)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meet

          public void meet(BindingSetAssignment node)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meet

          public void meet(ZeroLengthPath node)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meet

          public void meet(ArbitraryLengthPath node)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meet

          public void meet(Service node)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meet

          public void meet(StatementPattern sp)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meet

          public void meet(TripleRef tripleRef)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### getCardinality

          protected double getCardinality(StatementPattern sp)

    - #### getSubjectCardinality

          protected double getSubjectCardinality(StatementPattern sp)

      Override this if you are able to determine the cardinality based not only on the subjectVar itself but also the other vars (e.g. the predicate value might determine a subject subset).

    - #### getSubjectCardinality

          protected double getSubjectCardinality(Var var)

    - #### getPredicateCardinality

          protected double getPredicateCardinality(StatementPattern sp)

      Override this if you are able to determine the cardinality based not only on the predicateVar itself but also the other vars (e.g. the subject value might determine a predicate subset).

    - #### getPredicateCardinality

          protected double getPredicateCardinality(Var var)

    - #### getObjectCardinality

          protected double getObjectCardinality(StatementPattern sp)

      Override this if you are able to determine the cardinality based not only on the objectVar itself but also the other vars (e.g. the predicate value might determine an object subset).

    - #### getObjectCardinality

          protected double getObjectCardinality(Var var)

    - #### getContextCardinality

          protected double getContextCardinality(StatementPattern sp)

      Override this if you are able to determine the cardinality based not only on the contextVar itself but also the other vars (e.g. the subject value might determine a context subset).

    - #### getContextCardinality

          protected double getContextCardinality(Var var)

    - #### getCardinality

          protected double getCardinality(double varCardinality,
                                          Var var)

    - #### getCardinality

          protected double getCardinality(double varCardinality,
                                          Collection<Var> vars)

    - #### countConstantVars

          protected int countConstantVars(Iterable<Var> vars)

    - #### meet

          public void meet(Join node)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meet

          public void meet(LeftJoin node)

      Specified by:
        `meet` in interface `QueryModelVisitor<RuntimeException>`
      Overrides:
        `meet` in class `AbstractQueryModelVisitor<RuntimeException>`

    - #### meetBinaryTupleOperator

          protected void meetBinaryTupleOperator(BinaryTupleOperator node)

      Description copied from class: `AbstractQueryModelVisitor`
      Method called by all `meet` methods with a `BinaryTupleOperator` node as argument. Forwards the call to `AbstractQueryModelVisitor.meetNode(org.eclipse.rdf4j.query.algebra.QueryModelNode)` by default.
      Overrides:
        `meetBinaryTupleOperator` in class `AbstractQueryModelVisitor<RuntimeException>`
      Parameters:
        `node` - The node that is being visited.

    - #### meetUnaryTupleOperator

          protected void meetUnaryTupleOperator(UnaryTupleOperator node)

      Description copied from class: `AbstractQueryModelVisitor`
      Method called by all `meet` methods with a `UnaryTupleOperator` node as argument. Forwards the call to `AbstractQueryModelVisitor.meetNode(org.eclipse.rdf4j.query.algebra.QueryModelNode)` by default.
      Overrides:
        `meetUnaryTupleOperator` in class `AbstractQueryModelVisitor<RuntimeException>`
      Parameters:
        `node` - The node that is being visited.

    - #### meetNode

          protected void meetNode(QueryModelNode node)

      Description copied from class: `AbstractQueryModelVisitor`
      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 `AbstractQueryModelVisitor<RuntimeException>`
      Parameters:
        `node` - The node that is being visited.

    - #### meetExternalSet

          protected void meetExternalSet(ExternalSet node)

Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.