ibis::qContinuousRange Class Reference

Simple range condition. More...

#include <qExpr.h>

Inheritance diagram for ibis::qContinuousRange:

ibis::qRange ibis::qExpr

List of all members.

Public Member Functions

virtual const char * colName () const
 Returns the name of the attribute involved.
virtual qContinuousRangedup () const
virtual bool empty () const
 Is the current range empty?
void foldBoundaries ()
void foldUnsignedBoundaries ()
virtual bool inRange (double val) const
 Given a value, determine whether it is in the range defined.
double & leftBound ()
virtual const double & leftBound () const
 The lower bound of the range.
COMPAREleftOperator ()
COMPARE leftOperator () const
bool operator< (const qContinuousRange &y) const
 The operator< for ibis::qContinuousRange.
virtual void print (std::ostream &) const
 Print out the node in the string form.
virtual void printRange (std::ostream &out) const
 Print out the attribute name and the constants involved in the range expressions.
 qContinuousRange (const char *prop, COMPARE op, double val)
 Construct a one-side range expression.
 qContinuousRange (double lv, COMPARE lop, const char *prop, COMPARE rop, double rv)
 Construct a range expression from double-precision boundaries.
 qContinuousRange (const qContinuousRange &rhs)
 Copy constructor.
 qContinuousRange (const char *col, COMPARE op, uint32_t val)
 Construct a range expression with an integer boundary.
 qContinuousRange (const char *lstr, COMPARE lop, const char *prop, COMPARE rop, const char *rstr)
 Construct a range expression from strings.
 qContinuousRange ()
 Construct an empty range expression.
virtual void restrictRange (double left, double right)
 Reduce the range to be no more than [left, right].
double & rightBound ()
virtual const double & rightBound () const
 The upper bound of the range.
COMPARErightOperator ()
COMPARE rightOperator () const

Friends

void ibis::qExpr::simplify (ibis::qExpr *&)


Detailed Description

Simple range condition.

It is implemented as a derived class of qExpr. Possible range operator are defined in ibis::qExpr::COMPARE. It is designed to expression equality conditions, one-sided range conditions and two-sided range conditions.

///
/// /* an equality expression */
/// ibis::qExpr *expr = new ibis::qContinuousRange("a", ibis::qExpr::OP_EQ, 5.0);
/// /* a one-sided range expression */
/// ibis::qExpr *expr = new ibis::qContinuousRange("a", ibis::qExpr::OP_GE, 1.3);
/// /* a two-sided range expression */
/// ibis::qExpr *expr = new ibis::qContinuousRange(3.6, ibis::qExpr::OP_LE,
/// "a", ibis::qExpr::OP_LT, 4.7);
///
/// 

Member Function Documentation

bool ibis::qContinuousRange::inRange ( double  val  )  const [inline, virtual]

Given a value, determine whether it is in the range defined.

Return true if it is, return false, otherwise.

Implements ibis::qRange.

Referenced by ibis::qExpr::simplify().

void ibis::qContinuousRange::printRange ( std::ostream &  out  )  const [virtual]

Print out the attribute name and the constants involved in the range expressions.

Only print something is the node is a qRange.

Reimplemented from ibis::qExpr.

References ibis::qExpr::getLeft(), ibis::qExpr::getRight(), and ibis::qExpr::printRange().


The documentation for this class was generated from the following files:
Make It A Bit Faster
Disclaimers
FastBit source code
FastBit mailing list archive
Maintainer of this page