casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casacore::TableExprRange Class Reference

Select range of a column in an select expression. More...

#include <ExprRange.h>

Public Member Functions

 TableExprRange ()
 Default constructor (needed for Block<TableExprRange>). More...
 
 TableExprRange (const TableColumn &, double stval, double endval)
 Construct from a column and a single constant range. More...
 
 TableExprRange (const TableExprRange &)
 Copy constructor. More...
 
 ~TableExprRange ()
 
TableExprRangeoperator= (const TableExprRange &)
 Assignment operator (copy semantics). More...
 
const Vector< double > & start () const
 Return the vector of start values. More...
 
const Vector< double > & end () const
 Return the vector of end values. More...
 
const TableColumngetColumn () const
 Return the column object. More...
 
void mixAnd (const TableExprRange &)
 
void mixOr (const TableExprRange &)
 

Private Attributes

Vector< double > sval_p
 
Vector< double > eval_p
 
TableColumntabColPtr_p
 

Detailed Description

Select range of a column in an select expression.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Etymology

TableExprRange represents the ranges of a column as specified in a table select expression.

Synopsis

TableExprRange holds the ranges of values for a column as specified in a table select expression. It traverses the expression tree and composes the hull of the values. Only double values are taken into account. It can handle operators &&, ||, ==, >, >=, <, <=, !. It can handle a comparison operator only for a column with a constant. Other operators and expressions are non-convertable.

The ranges function in class TableExprNode returns a Block of TableExprRange objects which contains the ranges for each (applicable) column used in the expression.

Motivation

TableExprRange gives great possibilities in optimizing a table selection. It allows to get a rough estimate of the values needed for a column which can be used to do a fast preselect using an index.

To Do

Definition at line 87 of file ExprRange.h.

Constructor & Destructor Documentation

casacore::TableExprRange::TableExprRange ( )

Default constructor (needed for Block<TableExprRange>).

casacore::TableExprRange::TableExprRange ( const TableColumn ,
double  stval,
double  endval 
)

Construct from a column and a single constant range.

casacore::TableExprRange::TableExprRange ( const TableExprRange )

Copy constructor.

casacore::TableExprRange::~TableExprRange ( )

Member Function Documentation

const Vector< double > & casacore::TableExprRange::end ( ) const
inline

Return the vector of end values.

Together with the equally sized vector of start values, this forms the ranges for the column (which can be acquired using getColumn).

Definition at line 134 of file ExprRange.h.

References eval_p.

const TableColumn& casacore::TableExprRange::getColumn ( ) const

Return the column object.

void casacore::TableExprRange::mixAnd ( const TableExprRange )
void casacore::TableExprRange::mixOr ( const TableExprRange )
TableExprRange& casacore::TableExprRange::operator= ( const TableExprRange )

Assignment operator (copy semantics).

const Vector< double > & casacore::TableExprRange::start ( ) const
inline

Return the vector of start values.

Together with the equally sized vector of end values, this forms the ranges for the column (which can be acquired using getColumn).

Definition at line 132 of file ExprRange.h.

References sval_p.

Member Data Documentation

Vector<double> casacore::TableExprRange::eval_p
private

Definition at line 127 of file ExprRange.h.

Referenced by end().

Vector<double> casacore::TableExprRange::sval_p
private

Definition at line 126 of file ExprRange.h.

Referenced by start().

TableColumn* casacore::TableExprRange::tabColPtr_p
private

Definition at line 128 of file ExprRange.h.


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