Public Member Functions
ibis::math::term Class Reference

The abstract base class for arithmetic terms. More...

#include <qExpr.h>

Inheritance diagram for ibis::math::term:
ibis::qExpr ibis::math::bediener ibis::math::literal ibis::math::number ibis::math::stdFunction1 ibis::math::stdFunction2 ibis::math::variable ibis::selectClause::variable

List of all members.

Public Member Functions

virtual termdup () const =0
 Make a duplicate copy of the term.
virtual double eval () const =0
 Evaluate the term.
virtual bool isTrue () const
 Should the value be treated as true? This implementation captures the normal case, where an arithmetic expression is treated as 'true' if it is not zero.
virtual void print (std::ostream &out) const =0
 Print a human readable version of the expression.
virtual void printFull (std::ostream &out) const
 Same as print.
virtual termreduce ()
 Shorten the expression by evaluating the constants.
virtual TERM_TYPE termType () const =0

Detailed Description

The abstract base class for arithmetic terms.

All allowed arithmetic expressions in a compRange or a select expression are derived from this class. Constant expressions are also allowed to represent where clauses that are always true or always false.


Member Function Documentation

virtual bool ibis::math::term::isTrue ( ) const [inline, virtual]

Should the value be treated as true? This implementation captures the normal case, where an arithmetic expression is treated as 'true' if it is not zero.

Reimplemented in ibis::math::literal, and ibis::math::number.

References eval().

Referenced by ibis::query::doEstimate(), ibis::countQuery::doEvaluate(), ibis::query::doEvaluate(), ibis::countQuery::doScan(), and ibis::query::doScan().

virtual term* ibis::math::term::reduce ( ) [inline, virtual]

Shorten the expression by evaluating the constants.

Return a new pointer if the expression is changed, otherwise return the pointer this.

Reimplemented in ibis::math::stdFunction2, ibis::math::stdFunction1, and ibis::math::bediener.

Referenced by ibis::math::bediener::reduce(), ibis::math::stdFunction1::reduce(), ibis::math::stdFunction2::reduce(), ibis::qExpr::simplify(), ibis::selectClause::verify(), and ibis::selectClause::verifySome().


The documentation for this class was generated from the following file:

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive