casa
5.7.0-16
|
Handle class for a table column expression tree. More...
#include <ExprNode.h>
Public Member Functions | |
TableExprNode () | |
TableExprNode | operator+ () const |
Unary operators on numeric TableExprNode's. More... | |
TableExprNode | operator- () const |
TableExprNode | operator! () const |
Unary NOT-operator on boolean TableExprNode's. More... | |
TableExprNode | operator~ () const |
Unary bitwise negate-operator on integer TableExprNode's. More... | |
TableExprNode | in (const TableExprNodeSet &set, const TaQLStyle &=TaQLStyle(0)) const |
TableExprNode | useUnit (const Unit &unit) const |
Use a unit for the given TableExprNode. More... | |
TableExprNode (const Bool &value) | |
Constructors to convert a constant value to a TableExprNode. More... | |
TableExprNode (const Int64 &value) | |
TableExprNode (const Int &value) | |
TableExprNode (const uInt &value) | |
TableExprNode (const Float &value) | |
TableExprNode (const Double &value) | |
TableExprNode (const Complex &value) | |
TableExprNode (const DComplex &value) | |
TableExprNode (const String &value) | |
TableExprNode (const std::string &value) | |
TableExprNode (const char *) | |
TableExprNode (const Regex &value) | |
TableExprNode (const StringDistance &value) | |
TableExprNode (const TaqlRegex &value) | |
TableExprNode (const MVTime &value) | |
TableExprNode (const Array< Bool > &value) | |
TableExprNode (const Array< uChar > &value) | |
TableExprNode (const Array< Short > &value) | |
TableExprNode (const Array< uShort > &value) | |
TableExprNode (const Array< Int > &value) | |
TableExprNode (const Array< uInt > &value) | |
TableExprNode (const Array< Int64 > &value) | |
TableExprNode (const Array< Float > &value) | |
TableExprNode (const Array< Double > &value) | |
TableExprNode (const Array< Complex > &value) | |
TableExprNode (const Array< DComplex > &value) | |
TableExprNode (const Array< String > &value) | |
TableExprNode (const Array< MVTime > &value) | |
TableExprNode (const MArray< Bool > &value) | |
TableExprNode (const MArray< uChar > &value) | |
TableExprNode (const MArray< Short > &value) | |
TableExprNode (const MArray< uShort > &value) | |
TableExprNode (const MArray< Int > &value) | |
TableExprNode (const MArray< uInt > &value) | |
TableExprNode (const MArray< Int64 > &value) | |
TableExprNode (const MArray< Float > &value) | |
TableExprNode (const MArray< Double > &value) | |
TableExprNode (const MArray< Complex > &value) | |
TableExprNode (const MArray< DComplex > &value) | |
TableExprNode (const MArray< String > &value) | |
TableExprNode (const MArray< MVTime > &value) | |
TableExprNode (const TENShPtr &) | |
Construct a node from a node representation shared pointer which increments the reference count. More... | |
TableExprNode (TableExprNodeRep *rep) | |
Construct from a node representation. More... | |
TableExprNode (const TableExprNode &) | |
copy constructor (reference semantics). More... | |
TableExprNode & | operator= (const TableExprNode &) |
Assignment (reference semantics). More... | |
~TableExprNode () | |
The destructor deletes all the underlying TableExprNode objects,. More... | |
Bool | isNull () const |
Does the node contain no actual node? More... | |
void | disableApplySelection () |
Do not apply the selection. More... | |
void | applySelection (const Vector< uInt > &rownrs) |
Re-create the column object for a selection of rows. More... | |
const Unit & | unit () const |
Get the unit of the expression. More... | |
const Record & | attributes () const |
Get the attributes of the expression. More... | |
DataType | dataType () const |
Get the data type of the expression. More... | |
Bool | isScalar () const |
Is the expression a scalar? More... | |
uInt | nrow () const |
Get the number of rows in the table associated with this expression. More... | |
void | get (const TableExprId &id, Bool &value) const |
Get a value for this node in the given row. More... | |
void | get (const TableExprId &id, Int64 &value) const |
void | get (const TableExprId &id, Double &value) const |
void | get (const TableExprId &id, DComplex &value) const |
void | get (const TableExprId &id, String &value) const |
void | get (const TableExprId &id, TaqlRegex &value) const |
void | get (const TableExprId &id, MVTime &value) const |
void | get (const TableExprId &id, MArray< Bool > &value) const |
void | get (const TableExprId &id, MArray< Int64 > &value) const |
void | get (const TableExprId &id, MArray< Double > &value) const |
void | get (const TableExprId &id, MArray< DComplex > &value) const |
void | get (const TableExprId &id, MArray< String > &value) const |
void | get (const TableExprId &id, MArray< MVTime > &value) const |
void | get (const TableExprId &id, Array< Bool > &value) const |
void | get (const TableExprId &id, Array< Int64 > &value) const |
void | get (const TableExprId &id, Array< Double > &value) const |
void | get (const TableExprId &id, Array< DComplex > &value) const |
void | get (const TableExprId &id, Array< String > &value) const |
void | get (const TableExprId &id, Array< MVTime > &value) const |
Bool | getBool (const TableExprId &id) const |
Int64 | getInt (const TableExprId &id) const |
Double | getDouble (const TableExprId &id) const |
DComplex | getDComplex (const TableExprId &id) const |
MVTime | getDate (const TableExprId &id) const |
String | getString (const TableExprId &id) const |
Array< Bool > | getArrayBool (const TableExprId &id) const |
Array< Int64 > | getArrayInt (const TableExprId &id) const |
Array< Double > | getArrayDouble (const TableExprId &id) const |
Array< DComplex > | getArrayDComplex (const TableExprId &id) const |
Array< String > | getArrayString (const TableExprId &id) const |
Array< MVTime > | getArrayDate (const TableExprId &id) const |
MArray< Bool > | getBoolAS (const TableExprId &id) const |
Get a value as an array, even it it is a scalar. More... | |
MArray< Int64 > | getIntAS (const TableExprId &id) const |
MArray< Double > | getDoubleAS (const TableExprId &id) const |
MArray< DComplex > | getDComplexAS (const TableExprId &id) const |
MArray< String > | getStringAS (const TableExprId &id) const |
MArray< MVTime > | getDateAS (const TableExprId &id) const |
DataType | getColumnDataType () const |
Get the data type for doing a getColumn on the expression. More... | |
Array< Bool > | getColumnBool (const Vector< uInt > &rownrs) const |
Get the value of the expression evaluated for the entire column. More... | |
Array< uChar > | getColumnuChar (const Vector< uInt > &rownrs) const |
Array< Short > | getColumnShort (const Vector< uInt > &rownrs) const |
Array< uShort > | getColumnuShort (const Vector< uInt > &rownrs) const |
Array< Int > | getColumnInt (const Vector< uInt > &rownrs) const |
Array< uInt > | getColumnuInt (const Vector< uInt > &rownrs) const |
Array< Int64 > | getColumnInt64 (const Vector< uInt > &rownrs) const |
Array< Float > | getColumnFloat (const Vector< uInt > &rownrs) const |
Array< Double > | getColumnDouble (const Vector< uInt > &rownrs) const |
Array< Complex > | getColumnComplex (const Vector< uInt > &rownrs) const |
Array< DComplex > | getColumnDComplex (const Vector< uInt > &rownrs) const |
Array< String > | getColumnString (const Vector< uInt > &rownrs) const |
void | show (ostream &) const |
Show the tree. More... | |
void | ranges (Block< TableExprRange > &) |
Convert the tree to a number of range vectors which at least select the same things. More... | |
Bool | checkTableSize (const Table &table, Bool canBeConst) const |
Check if tables used in expression have the same number of rows as the given table. More... | |
const Table & | table () const |
Get table. More... | |
const TENShPtr & | getRep () const |
returns const pointer to the underlying TableExprNodeRep object. More... | |
const TableExprNodeRep * | getNodeRep () const |
void | adaptUnit (const Unit &) |
Adapt the unit of the expression to the given unit (if not empty). More... | |
TENShPtr | newPlus (const TENShPtr &right) const |
Construct a new node for the given operation. More... | |
TENShPtr | newMinus (const TENShPtr &right) const |
TENShPtr | newTimes (const TENShPtr &right) const |
TENShPtr | newDivide (const TENShPtr &right) const |
TENShPtr | newModulo (const TENShPtr &right) const |
TENShPtr | newBitAnd (const TENShPtr &right) const |
TENShPtr | newBitOr (const TENShPtr &right) const |
TENShPtr | newBitXor (const TENShPtr &right) const |
TENShPtr | newEQ (const TENShPtr &right) const |
TENShPtr | newNE (const TENShPtr &right) const |
TENShPtr | newGE (const TENShPtr &right) const |
TENShPtr | newGT (const TENShPtr &right) const |
TENShPtr | newIN (const TENShPtr &right, const TaQLStyle &) const |
TENShPtr | newOR (const TENShPtr &right) const |
TENShPtr | newAND (const TENShPtr &right) const |
TableExprNode | operator() (const TableExprNodeSet &indices) |
Slicing in a node containing an array. More... | |
TableExprNode | in (const TableExprNode &array, const TaQLStyle &=TaQLStyle(0)) const |
The IN operator to test if a value is contained in an array or set. More... | |
Static Public Member Functions | |
static TableExprNode | newColumnNode (const Table &tab, const String &name, const Vector< String > &fieldNames) |
Create a column node on behalf of the Table class. More... | |
static TableExprNode | newKeyConst (const TableRecord &, const Vector< String > &fieldNames) |
Create a TableExprNodeConst for a table keyword (which is handled as a constant). More... | |
static TableRecord * | findLastKeyRec (const TableRecord &keyset, const Vector< String > &fieldNames, String &fullName) |
Handle all field names except the last one. More... | |
static void | throwInvDT (const String &message) |
Throw invalid data type exception. More... | |
static TableExprNode | newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNodeSet &set, const Table &table, const TaQLStyle &=TaQLStyle(0)) |
Create function node of the given type with the given arguments. More... | |
static TableExprNode | newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode &node) |
static TableExprNode | newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode &node1, const TableExprNode &node2) |
static TableExprNode | newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode &node1, const TableExprNode &node2, const TableExprNode &node3) |
static TableExprNode | newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode &array, const TableExprNodeSet &axes) |
static TableExprNode | newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode &array, const TableExprNode &node, const TableExprNodeSet &axes) |
static TableExprNode | newUDFNode (const String &name, const TableExprNodeSet &set, const Table &table, const TaQLStyle &=TaQLStyle(0)) |
Create a user defined function node. More... | |
static TableExprNode | newConeNode (TableExprFuncNode::FunctionType, const TableExprNodeSet &set, uInt origin=0) |
Create cone function node of the given type with the given arguments. More... | |
static TableExprNode | newConeNode (TableExprFuncNode::FunctionType, const TableExprNode &node1, const TableExprNode &node2) |
static TableExprNode | newConeNode (TableExprFuncNode::FunctionType, const TableExprNode &node1, const TableExprNode &node2, const TableExprNode &node3) |
static TableExprNode | newRownrNode (const Table &table, uInt origin) |
Create rownumber() function node. More... | |
static TableExprNode | newRowidNode (const Table &table) |
Create rowid() function node. More... | |
static TableExprNode | newRandomNode (const Table &table) |
Create rand() function node. More... | |
static TableExprNode | newArrayPartNode (const TableExprNode &arrayNode, const TableExprNodeSet &indices, const TaQLStyle &=TaQLStyle(0)) |
Create ArrayElement node for the given array with the given index. More... | |
Private Member Functions | |
TENShPtr | setBinaryNodeInfo (TableExprNodeBinary *tsnptr, const TENShPtr &right=TENShPtr()) const |
Put the new binary node object in a shared pointer. More... | |
Static Private Member Functions | |
static std::vector< TENShPtr > | convertBlockTEN (Block< TableExprNode > &nodes) |
convert Block of TableExprNode to vector of TENShPtr. More... | |
Private Attributes | |
TENShPtr | node_p |
The actual (counted referenced) representation of a node. More... | |
Handle class for a table column expression tree.
Public interface
TableExprNode represents a node in the tree reflecting a table select expression.
TableExprNode is the class to store a table select expression, making it possible to select rows from the table. The selected rows form a table which is a view of the original table.
TableExprNode is a handle class for the counted referenced class TableExprNodeRep. Classes (like TableExprNodePlusXX) derived from TableExprNodeRep hold the individual nodes in the expression, i.e. the operators and operands. The nodes form a binary tree reflecting the expression. E.g. the expression 2*COLUMN results in the node TableExprNodeTimes with its children TableExprNodeConst and TableExprNodeColumn. Constant subexpressions (like 2*3) are evaluated immediately and only the result is stored as a node.
There are a few TableExprNode constructors taking a constant scalar or array. In this way constant value are automatically converted to the appropriate TableExprNodeConst object.
The derived classes also reflect the data type of the node. Data types Bool, Int64, Double, DComplex and String are used. Char, uChar, Short, uShort, Int and uInt are converted to Int64, float to Double, and Complex to DComplex. Binary operators +, -, *, /, %, &, }, ^, ==, >=, >, <, <= and != are recognized. Also &&, ||, parentheses and unary +, -, ~ and ! are recognized. For strings the binary operator + can also be used. The operators have the normal C++ precedence. Furthermore functions (such as sin, max, ceil) can be used in an expression.
Operator() can be used to take a slice from an array.
The Table function col has to be used to create a TableExprNode object for a column in the table. The Table operator() can be used the do the actual selection from the top TableExprNode object.
Having TableExprNode as a handle class makes it possible to handle temporary objects created by the compiler in a smooth way. TableExprNode and its derivations allow to store an expression before actually evaluating it. This also allows the classes to be used by the table expression parser defined in TableParse and TableGram.
For each operator a special derived class is implemented. Another approach could have been to store the operator as a flag and switch on that. However, that causes extra overhead and the C++ virtual function mechanism is the designed for these purposes.
Definition at line 155 of file ExprNode.h.
casacore::TableExprNode::TableExprNode | ( | ) |
casacore::TableExprNode::TableExprNode | ( | const Bool & | value | ) |
Constructors to convert a constant value to a TableExprNode.
The constructor for char* is also supported to convert a character-array to a string, since a two step conversion is not done automatically.
casacore::TableExprNode::TableExprNode | ( | const Int64 & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Int & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const uInt & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Float & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Double & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Complex & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const DComplex & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const String & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const std::string & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const char * | ) |
casacore::TableExprNode::TableExprNode | ( | const Regex & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const StringDistance & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const TaqlRegex & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const MVTime & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Array< Complex > & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Array< DComplex > & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const MArray< Complex > & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const MArray< DComplex > & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const TENShPtr & | ) |
Construct a node from a node representation shared pointer which increments the reference count.
|
inline |
Construct from a node representation.
It takes over the pointer, so the object gets deleted automatically.
Definition at line 251 of file ExprNode.h.
casacore::TableExprNode::TableExprNode | ( | const TableExprNode & | ) |
copy constructor (reference semantics).
casacore::TableExprNode::~TableExprNode | ( | ) |
The destructor deletes all the underlying TableExprNode objects,.
void casacore::TableExprNode::adaptUnit | ( | const Unit & | ) |
Adapt the unit of the expression to the given unit (if not empty).
Referenced by casacore::TableParseUpdate::adaptUnit().
Re-create the column object for a selection of rows.
Nothing is done if the node does not represent a column object.
Definition at line 273 of file ExprNode.h.
References node_p.
|
inline |
Check if tables used in expression have the same number of rows as the given table.
|
staticprivate |
convert Block of TableExprNode to vector of TENShPtr.
DataType casacore::TableExprNode::dataType | ( | ) | const |
Get the data type of the expression.
Currently the only possible values are TpBool, TpInt, TpDouble, TpDComplex, TpString, and TpOther. The latter is returned for a date or regex.
|
inline |
|
static |
Handle all field names except the last one.
ALl of them must be records. The last record is returned. fullName is filled with the full keyword name separated by dots.
|
inline |
Get a value for this node in the given row.
These functions are implemented in the derived classes and will usually invoke the get in their children and apply the operator on the resulting values.
Definition at line 532 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 534 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 536 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 538 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 540 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 542 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 544 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 546 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 549 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 552 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 555 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 558 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 561 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 564 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 567 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 570 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 573 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 576 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 579 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 594 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 604 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 600 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 598 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 596 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 602 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 582 of file ExprNode.h.
References node_p.
|
inline |
Get a value as an array, even it it is a scalar.
This is useful in case one can give an argument as scalar or array.
Definition at line 606 of file ExprNode.h.
References node_p.
Get the value of the expression evaluated for the entire column.
The data of function called should match the data type as returned by function getColumnDataType
.
Definition at line 619 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 637 of file ExprNode.h.
References node_p.
DataType casacore::TableExprNode::getColumnDataType | ( | ) | const |
Get the data type for doing a getColumn on the expression.
This is the data type of the column if the expression consists of a single column only. Otherwise it is the expression data type as returned by function dataType
.
|
inline |
Definition at line 639 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 635 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 633 of file ExprNode.h.
References node_p.
Definition at line 627 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 631 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 623 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 641 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 621 of file ExprNode.h.
References node_p.
Definition at line 629 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 625 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 590 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 616 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 588 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 612 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 586 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 610 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 584 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 608 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 648 of file ExprNode.h.
References casacore::CountedPtr< T >::get(), and node_p.
|
inline |
returns const pointer to the underlying TableExprNodeRep object.
Definition at line 646 of file ExprNode.h.
References node_p.
Referenced by in(), casacore::operator!=(), casacore::operator%(), casacore::operator&(), casacore::operator*(), casacore::operator+(), casacore::operator-(), casacore::operator/(), casacore::operator<(), casacore::operator<=(), casacore::operator==(), casacore::operator>(), casacore::operator>=(), casacore::operator^(), and casacore::operator|().
|
inline |
Definition at line 592 of file ExprNode.h.
References node_p.
|
inline |
Definition at line 614 of file ExprNode.h.
References node_p.
|
inline |
The IN operator to test if a value is contained in an array or set.
The array can also be a scalar.
Definition at line 1183 of file ExprNode.h.
TableExprNode casacore::TableExprNode::in | ( | const TableExprNodeSet & | set, |
const TaQLStyle & | = TaQLStyle(0) |
||
) | const |
|
inline |
Does the node contain no actual node?
Definition at line 264 of file ExprNode.h.
References node_p.
Referenced by casacore::TaQLResult::isTable().
|
inline |
Is the expression a scalar?
Definition at line 291 of file ExprNode.h.
References node_p, and casacore::TableExprNodeRep::VTScalar.
|
static |
Create ArrayElement node for the given array with the given index.
The origin is 0 for C++ and 1 for TaQL.
Referenced by operator()().
Referenced by casacore::operator&().
Referenced by casacore::operator|().
Referenced by casacore::operator^().
|
static |
Create a column node on behalf of the Table class.
For builtin data types another type of node is created than for other data types.
|
static |
Create cone function node of the given type with the given arguments.
Referenced by casacore::anyCone(), casacore::cones(), and casacore::findCone().
|
static |
|
static |
Referenced by casacore::operator/().
Referenced by casacore::operator==().
|
static |
Create function node of the given type with the given arguments.
Referenced by casacore::abs(), casacore::acos(), casacore::all(), casacore::alls(), casacore::amplitude(), casacore::angdist(), casacore::angdistx(), casacore::any(), casacore::anys(), casacore::arg(), casacore::array(), casacore::arrayData(), casacore::arrayFlatten(), casacore::arrayMask(), casacore::asin(), casacore::atan(), casacore::atan2(), casacore::avdev(), casacore::avdevs(), casacore::boolean(), casacore::boxedAll(), casacore::boxedAny(), casacore::boxedAvdev(), casacore::boxedMax(), casacore::boxedMean(), casacore::boxedMedian(), casacore::boxedMin(), casacore::boxedRms(), casacore::boxedStddev(), casacore::boxedVariance(), casacore::capitalize(), casacore::cdate(), casacore::cdow(), casacore::ceil(), casacore::cmonth(), casacore::conj(), casacore::cos(), casacore::cosh(), casacore::ctime(), casacore::ctodt(), casacore::cube(), casacore::date(), casacore::datetime(), casacore::day(), casacore::diagonal(), casacore::dms(), casacore::downcase(), casacore::exp(), casacore::floor(), casacore::fmod(), casacore::formComplex(), casacore::fractile(), casacore::fractiles(), casacore::hdms(), casacore::hms(), casacore::iif(), casacore::imag(), casacore::integer(), casacore::isdefined(), casacore::isFinite(), casacore::isInf(), casacore::isNaN(), casacore::log(), casacore::log10(), casacore::ltrim(), casacore::marray(), casacore::max(), casacore::maxs(), casacore::mean(), casacore::means(), casacore::median(), casacore::medians(), casacore::min(), casacore::mins(), casacore::mjd(), casacore::mjdtodate(), casacore::month(), casacore::ndim(), casacore::near(), casacore::nearAbs(), casacore::nelements(), casacore::nfalse(), casacore::nfalses(), casacore::norm(), casacore::ntrue(), casacore::ntrues(), casacore::pattern(), casacore::phase(), casacore::pow(), casacore::product(), casacore::products(), casacore::real(), casacore::regex(), casacore::replace(), casacore::rms(), casacore::rmss(), casacore::round(), casacore::rtrim(), casacore::runningAll(), casacore::runningAny(), casacore::runningAvdev(), casacore::runningMax(), casacore::runningMean(), casacore::runningMedian(), casacore::runningMin(), casacore::runningRms(), casacore::runningStddev(), casacore::runningVariance(), casacore::shape(), casacore::sign(), casacore::sin(), casacore::sinh(), casacore::sqlpattern(), casacore::sqrt(), casacore::square(), casacore::stddev(), casacore::stddevs(), casacore::strlength(), casacore::substr(), casacore::sum(), casacore::sums(), casacore::sumSquare(), casacore::sumSquares(), casacore::tan(), casacore::tanh(), casacore::time(), casacore::toString(), casacore::transpose(), casacore::trim(), casacore::upcase(), casacore::variance(), casacore::variances(), casacore::week(), casacore::weekday(), and casacore::year().
|
static |
|
static |
|
static |
|
static |
|
static |
Referenced by casacore::operator<=(), and casacore::operator>=().
Referenced by casacore::operator<(), and casacore::operator>().
Referenced by in().
|
static |
Create a TableExprNodeConst for a table keyword (which is handled as a constant).
Referenced by casacore::operator-().
Referenced by casacore::operator%().
Referenced by casacore::operator!=().
Construct a new node for the given operation.
Referenced by casacore::operator+().
|
static |
Create rand() function node.
|
static |
Create rowid() function node.
Origin is always 0.
|
static |
Create rownumber() function node.
Origin indicates whether the first row should be zero (for C++ binding) or an other value (one for TaQL binding).
Referenced by casacore::operator*().
|
static |
Create a user defined function node.
|
inline |
Get the number of rows in the table associated with this expression.
One is returned if the expression is a constant. Zero is returned if no table is associated with it.
Definition at line 297 of file ExprNode.h.
References node_p.
TableExprNode casacore::TableExprNode::operator! | ( | ) | const |
Unary NOT-operator on boolean TableExprNode's.
|
inline |
Slicing in a node containing an array.
It is possible to address a single pixel or an n-dimensional subarray. In case of a single pixel the result is a scalar node. Otherwise the result is an array node with the same dimensionality as the source.
Note that there exist TableExprNodeSet constructors to convert an IPosition
or Slicer
object automatically to a TableExprNodeSet
. An IPosition
addresses a single element and results in a scalar node, while a Slicer
can address multiple elements and always results in an array node.
C++ indexing is 0-based.
Definition at line 1188 of file ExprNode.h.
References newArrayPartNode().
TableExprNode casacore::TableExprNode::operator+ | ( | ) | const |
Unary operators on numeric TableExprNode's.
TableExprNode casacore::TableExprNode::operator- | ( | ) | const |
TableExprNode& casacore::TableExprNode::operator= | ( | const TableExprNode & | ) |
Assignment (reference semantics).
TableExprNode casacore::TableExprNode::operator~ | ( | ) | const |
Unary bitwise negate-operator on integer TableExprNode's.
|
inline |
Convert the tree to a number of range vectors which at least select the same things.
This function is very useful to convert the expression to some intervals covering the select expression. This can be used to do a rough fast selection via an index and do the the slower final selection on that much smaller subset. The function can only convert direct comparisons of columns with constants (via ==, !=, >, >=, < or <=) and their combinations using && or ||.
Definition at line 524 of file ExprNode.h.
References node_p.
|
private |
Put the new binary node object in a shared pointer.
Set the node's info and adapt the children if needed. If the node is constant, it is evaluated and returned as result.
|
inline |
|
inline |
Get table.
This gets the Table object to which a TableExprNode belongs. A TableExprNode belongs to the Table to which the column(s) used in an expression belong. Note that all columns in an expression have to belong to the same table.
Definition at line 528 of file ExprNode.h.
References node_p.
|
static |
Throw invalid data type exception.
|
inline |
TableExprNode casacore::TableExprNode::useUnit | ( | const Unit & | unit | ) | const |
Use a unit for the given TableExprNode.
Note that if a column has a unit, it is automatically set. In that case this can be used to convert units.
|
private |
The actual (counted referenced) representation of a node.
Definition at line 519 of file ExprNode.h.
Referenced by applySelection(), attributes(), disableApplySelection(), get(), getArrayBool(), getArrayDate(), getArrayDComplex(), getArrayDouble(), getArrayInt(), getArrayString(), getBool(), getBoolAS(), getColumnBool(), getColumnComplex(), getColumnDComplex(), getColumnDouble(), getColumnFloat(), getColumnInt(), getColumnInt64(), getColumnShort(), getColumnString(), getColumnuChar(), getColumnuInt(), getColumnuShort(), getDate(), getDateAS(), getDComplex(), getDComplexAS(), getDouble(), getDoubleAS(), getInt(), getIntAS(), getNodeRep(), getRep(), getString(), getStringAS(), isNull(), isScalar(), nrow(), ranges(), show(), table(), and unit().