casacore
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
casacore::TableExprNode Class Reference

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< 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< 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 (TableExprNodeRep *)
 Construct a node from a node representation. More...
 
 TableExprNode (const TableExprNode &)
 copy constructor (reference semantics). More...
 
TableExprNodeoperator= (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 Unitunit () const
 Get the unit 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...
 
DataType getColumnDataType () const
 Get the data type for doing a getColumn on the expression. 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...
 
void adaptUnit (const Unit &)
 Adapt the unit of the expression to the given unit (if not empty). 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 TableRecordfindLastKeyRec (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

TableExprNodeRepnewPlus (TableExprNodeRep *right) const
 Construct a new node for the given operation. More...
 
TableExprNodeRepnewMinus (TableExprNodeRep *right) const
 
TableExprNodeRepnewTimes (TableExprNodeRep *right) const
 
TableExprNodeRepnewDivide (TableExprNodeRep *right) const
 
TableExprNodeRepnewModulo (TableExprNodeRep *right) const
 
TableExprNodeRepnewBitAnd (TableExprNodeRep *right) const
 
TableExprNodeRepnewBitOr (TableExprNodeRep *right) const
 
TableExprNodeRepnewBitXor (TableExprNodeRep *right) const
 
TableExprNodeRepnewEQ (TableExprNodeRep *right) const
 
TableExprNodeRepnewNE (TableExprNodeRep *right) const
 
TableExprNodeRepnewGE (TableExprNodeRep *right) const
 
TableExprNodeRepnewGT (TableExprNodeRep *right) const
 
TableExprNodeRepnewIN (TableExprNodeRep *right, const TaQLStyle &) const
 
TableExprNodeRepnewOR (TableExprNodeRep *right) const
 
TableExprNodeRepnewAND (TableExprNodeRep *right) const
 

Static Private Member Functions

static PtrBlock< TableExprNodeRep * > convertBlockTEN (Block< TableExprNode > &nodes)
 convert Block of TableExprNode to PtrBlock of TableExprNodeRep*. More...
 

Private Attributes

TableExprNodeRepnode_p
 The actual (counted referenced) representation of a node. More...
 

Friends

class TableExprNodeRep
 
class TableParse
 
TableExprNode operator+ (const TableExprNode &left, const TableExprNode &right)
 Define all global functions as friends. More...
 
TableExprNode operator- (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator* (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator/ (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator% (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator & (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator| (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator^ (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator== (const TableExprNode &left, const TableExprNode &right)
 Comparison operators. More...
 
TableExprNode operator!= (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator>= (const TableExprNode &left, const TableExprNode &right)
 Not defined for Bool. More...
 
TableExprNode operator> (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator<= (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator< (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode operator && (const TableExprNode &left, const TableExprNode &right)
 Logical operators to combine boolean TableExprNode's. More...
 
TableExprNode operator|| (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode near (const TableExprNode &left, const TableExprNode &right)
 Functions to return whether a value is "relatively" near another. More...
 
TableExprNode near (const TableExprNode &left, const TableExprNode &right, const TableExprNode &tolerance)
 
TableExprNode nearAbs (const TableExprNode &left, const TableExprNode &right)
 
TableExprNode nearAbs (const TableExprNode &left, const TableExprNode &right, const TableExprNode &tolerance)
 
TableExprNode angdist (const TableExprNode &pos1, const TableExprNode &pos2)
 Angular distance between positions. More...
 
TableExprNode cones (const TableExprNode &sourcePos, const TableExprNode &cones)
 Cone search; test if the position of a source is inside a cone. More...
 
TableExprNode anyCone (const TableExprNode &sourcePos, const TableExprNode &cones)
 The result is always a Bool scalar telling if any cone contains the source. More...
 
TableExprNode findCone (const TableExprNode &sourcePos, const TableExprNode &cones)
 The sourcePos can contain multiple sources. More...
 
TableExprNode cones (const TableExprNode &sourcePos, const TableExprNode &conePos, const TableExprNode &radii)
 Cone search as above. More...
 
TableExprNode anyCone (const TableExprNode &sourcePos, const TableExprNode &conePos, const TableExprNode &radii)
 
TableExprNode findCone (const TableExprNode &sourcePos, const TableExprNode &conePos, const TableExprNode &radii)
 
TableExprNode sin (const TableExprNode &node)
 Transcendental functions that can be applied to essentially all numeric nodes containing scalars or arrays. More...
 
TableExprNode sinh (const TableExprNode &node)
 
TableExprNode cos (const TableExprNode &node)
 
TableExprNode cosh (const TableExprNode &node)
 
TableExprNode exp (const TableExprNode &node)
 
TableExprNode log (const TableExprNode &node)
 
TableExprNode log10 (const TableExprNode &node)
 
TableExprNode pow (const TableExprNode &x, const TableExprNode &exp)
 
TableExprNode square (const TableExprNode &node)
 
TableExprNode cube (const TableExprNode &node)
 
TableExprNode sqrt (const TableExprNode &node)
 
TableExprNode norm (const TableExprNode &node)
 
TableExprNode asin (const TableExprNode &node)
 Transcendental functions applied to to nodes containing scalars or arrays with double values. More...
 
TableExprNode acos (const TableExprNode &node)
 
TableExprNode atan (const TableExprNode &node)
 
TableExprNode atan2 (const TableExprNode &y, const TableExprNode &x)
 
TableExprNode tan (const TableExprNode &node)
 
TableExprNode tanh (const TableExprNode &node)
 
TableExprNode sign (const TableExprNode &node)
 
TableExprNode round (const TableExprNode &node)
 
TableExprNode ceil (const TableExprNode &node)
 
TableExprNode abs (const TableExprNode &node)
 
TableExprNode floor (const TableExprNode &node)
 
TableExprNode fmod (const TableExprNode &x, const TableExprNode &y)
 
TableExprNode strlength (const TableExprNode &node)
 String functions on scalars or arrays. More...
 
TableExprNode upcase (const TableExprNode &node)
 
TableExprNode downcase (const TableExprNode &node)
 
TableExprNode capitalize (const TableExprNode &node)
 
TableExprNode trim (const TableExprNode &node)
 
TableExprNode ltrim (const TableExprNode &node)
 
TableExprNode rtrim (const TableExprNode &node)
 
TableExprNode substr (const TableExprNode &str, const TableExprNode &pos)
 
TableExprNode substr (const TableExprNode &str, const TableExprNode &pos, const TableExprNode &npos)
 
TableExprNode replace (const TableExprNode &str, const TableExprNode &patt)
 
TableExprNode replace (const TableExprNode &str, const TableExprNode &patt, const TableExprNode &repl)
 
TableExprNode regex (const TableExprNode &node)
 Functions for regular expression matching and pattern matching. More...
 
TableExprNode pattern (const TableExprNode &node)
 
TableExprNode sqlpattern (const TableExprNode &node)
 
TableExprNode datetime (const TableExprNode &node)
 Functions for date-values. More...
 
TableExprNode mjdtodate (const TableExprNode &node)
 
TableExprNode mjd (const TableExprNode &node)
 
TableExprNode date (const TableExprNode &node)
 
TableExprNode year (const TableExprNode &node)
 
TableExprNode month (const TableExprNode &node)
 
TableExprNode day (const TableExprNode &node)
 
TableExprNode cmonth (const TableExprNode &node)
 
TableExprNode weekday (const TableExprNode &node)
 
TableExprNode cdow (const TableExprNode &node)
 
TableExprNode ctodt (const TableExprNode &node)
 
TableExprNode cdate (const TableExprNode &node)
 
TableExprNode ctime (const TableExprNode &node)
 
TableExprNode week (const TableExprNode &node)
 
TableExprNode time (const TableExprNode &node)
 
TableExprNode isNaN (const TableExprNode &node)
 Function to test if a scalar or array is NaN (not-a-number). More...
 
TableExprNode isFinite (const TableExprNode &node)
 Function to test if a scalar or array is finite. More...
 
TableExprNode min (const TableExprNode &a, const TableExprNode &b)
 Minimum or maximum of 2 nodes. More...
 
TableExprNode max (const TableExprNode &a, const TableExprNode &b)
 
TableExprNode conj (const TableExprNode &node)
 The complex conjugate of a complex node. More...
 
TableExprNode real (const TableExprNode &node)
 The real part of a complex node. More...
 
TableExprNode imag (const TableExprNode &node)
 The imaginary part of a complex node. More...
 
TableExprNode integer (const TableExprNode &node)
 Convert double, bool, or string to int (using floor). More...
 
TableExprNode boolean (const TableExprNode &node)
 Convert numeric or string value to bool (0, no, false, - means false) More...
 
TableExprNode amplitude (const TableExprNode &node)
 The amplitude (i.e. More...
 
TableExprNode phase (const TableExprNode &node)
 The phase (i.e. More...
 
TableExprNode arg (const TableExprNode &node)
 The arg (i.e. More...
 
TableExprNode formComplex (const TableExprNode &real, const TableExprNode &imag)
 Form a complex number from two Doubles. More...
 
TableExprNode formComplex (const TableExprNode &node)
 Form a complex number from a string. More...
 
TableExprNode sum (const TableExprNode &array)
 Functions operating on a Double or Complex scalar or array resulting in a scalar with the same data type. More...
 
TableExprNode product (const TableExprNode &array)
 
TableExprNode sumSquare (const TableExprNode &array)
 
TableExprNode min (const TableExprNode &array)
 Functions operating on a Double scalar or array resulting in a Double scalar. More...
 
TableExprNode max (const TableExprNode &array)
 
TableExprNode mean (const TableExprNode &array)
 
TableExprNode variance (const TableExprNode &array)
 
TableExprNode stddev (const TableExprNode &array)
 
TableExprNode avdev (const TableExprNode &array)
 
TableExprNode rms (const TableExprNode &array)
 
TableExprNode median (const TableExprNode &array)
 
TableExprNode fractile (const TableExprNode &array, const TableExprNode &fraction)
 
TableExprNode any (const TableExprNode &array)
 
TableExprNode all (const TableExprNode &array)
 
TableExprNode ntrue (const TableExprNode &array)
 
TableExprNode nfalse (const TableExprNode &array)
 
TableExprNode sums (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 The partial version of the functions above. More...
 
TableExprNode products (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode sumSquares (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode mins (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode maxs (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode means (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode variances (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode stddevs (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode avdevs (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode rmss (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode medians (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode fractiles (const TableExprNode &array, const TableExprNode &fraction, const TableExprNodeSet &collapseAxes)
 
TableExprNode anys (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode alls (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode ntrues (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode nfalses (const TableExprNode &array, const TableExprNodeSet &collapseAxes)
 
TableExprNode runningMin (const TableExprNode &array)
 
TableExprNode runningMax (const TableExprNode &array)
 
TableExprNode runningMean (const TableExprNode &array)
 
TableExprNode runningVariance (const TableExprNode &array)
 
TableExprNode runningStddev (const TableExprNode &array)
 
TableExprNode runningAvdev (const TableExprNode &array)
 
TableExprNode runningRms (const TableExprNode &array)
 
TableExprNode runningMedian (const TableExprNode &array)
 
TableExprNode runningAny (const TableExprNode &array)
 
TableExprNode runningAll (const TableExprNode &array)
 
TableExprNode array (const TableExprNode &values, const TableExprNodeSet &shape)
 Create an array of the given shape and fill it with the values. More...
 
TableExprNode marray (const TableExprNode &array, const TableExprNode &mask)
 Form a masked array. More...
 
TableExprNode arrayData (const TableExprNode &array)
 Get the data array of a masked array. More...
 
TableExprNode arrayMask (const TableExprNode &array)
 Get the mask of a masked array. More...
 
TableExprNode arrayFlatten (const TableExprNode &array)
 Flatten a masked array (get unmasked elements). More...
 
TableExprNode transpose (const TableExprNode &array)
 Transpose all axes of a (masked) array. More...
 
TableExprNode transpose (const TableExprNode &array, const TableExprNodeSet &axes)
 
TableExprNode diagonal (const TableExprNode &array)
 Get the diagonal of a (masked) array; If the array is not a Matrix, it will take the diagonals of the subarrays given by the two axes in the axes argument. More...
 
TableExprNode diagonal (const TableExprNode &array, const TableExprNode &firstAxis)
 
TableExprNode diagonal (const TableExprNode &array, const TableExprNode &firstAxis, const TableExprNode &diag)
 
TableExprNode isdefined (const TableExprNode &array)
 Function operating on a field resulting in a bool scalar. More...
 
TableExprNode nelements (const TableExprNode &array)
 Functions operating on any scalar or array resulting in a Double scalar. More...
 
TableExprNode ndim (const TableExprNode &array)
 
TableExprNode shape (const TableExprNode &array)
 Function operating on any scalar or array resulting in a Double array containing the shape. More...
 
TableExprNode iif (const TableExprNode &condition, const TableExprNode &arg1, const TableExprNode &arg2)
 Function resembling the ternary ?: construct in C++. More...
 
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...
 
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
 
String getString (const TableExprId &id) const
 
Array< BoolgetArrayBool (const TableExprId &id) const
 
Array< Int64getArrayInt (const TableExprId &id) const
 
Array< DoublegetArrayDouble (const TableExprId &id) const
 
Array< DComplex > getArrayDComplex (const TableExprId &id) const
 
Array< StringgetArrayString (const TableExprId &id) const
 
Array< MVTimegetArrayDate (const TableExprId &id) const
 
MArray< BoolgetBoolAS (const TableExprId &id) const
 Get a value as an array, even it it is a scalar. More...
 
MArray< Int64getIntAS (const TableExprId &id) const
 
MArray< DoublegetDoubleAS (const TableExprId &id) const
 
MArray< DComplex > getDComplexAS (const TableExprId &id) const
 
MArray< StringgetStringAS (const TableExprId &id) const
 
MArray< MVTimegetDateAS (const TableExprId &id) const
 
Array< BoolgetColumnBool (const Vector< uInt > &rownrs) const
 Get the value of the expression evaluated for the entire column. More...
 
Array< uChargetColumnuChar (const Vector< uInt > &rownrs) const
 
Array< ShortgetColumnShort (const Vector< uInt > &rownrs) const
 
Array< uShortgetColumnuShort (const Vector< uInt > &rownrs) const
 
Array< IntgetColumnInt (const Vector< uInt > &rownrs) const
 
Array< uIntgetColumnuInt (const Vector< uInt > &rownrs) const
 
Array< FloatgetColumnFloat (const Vector< uInt > &rownrs) const
 
Array< DoublegetColumnDouble (const Vector< uInt > &rownrs) const
 
Array< Complex > getColumnComplex (const Vector< uInt > &rownrs) const
 
Array< DComplex > getColumnDComplex (const Vector< uInt > &rownrs) const
 
Array< StringgetColumnString (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...
 
const Tabletable () const
 Get table. More...
 
const TableExprNodeRepgetNodeRep () const
 returns const pointer to the representation-object of it More...
 
TableExprNodeRepgetRep ()
 returns non-const pointer to the representation-object of it More...
 

Detailed Description

Handle class for a table column expression tree.

Intended use:

Public interface

Review Status

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

Prerequisite

Etymology

TableExprNode represents a node in the tree reflecting a table select expression.

Synopsis

TableExprNode is the class to store a table select expression, which allows 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, Double, DComplex and String are used. Char, uChar, Short, uShort, Int, uInt and float are converted 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 (like 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.

Example

// Select from table X all rows where column RA<5 and where column
// SWITCH is true.
Table table("X");
Table subtable = table(table.col("RA") < 5 && table.col("SWITCH"));
// Select from that result all rows where the concatenation of
// the strings in columns STR1 and STR2 is equal to the string
// in keyword STRKEY.
Table subsub = subtable(subtable.col("STR1") + subtable.col("STR2")
== subtable.key("STRKEY"));

Motivation

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.

To Do

Definition at line 614 of file ExprNode.h.

Constructor & Destructor Documentation

§ TableExprNode() [1/42]

casacore::TableExprNode::TableExprNode ( )

§ TableExprNode() [2/42]

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.

§ TableExprNode() [3/42]

casacore::TableExprNode::TableExprNode ( const Int64 value)

§ TableExprNode() [4/42]

casacore::TableExprNode::TableExprNode ( const Int value)

§ TableExprNode() [5/42]

casacore::TableExprNode::TableExprNode ( const uInt value)

§ TableExprNode() [6/42]

casacore::TableExprNode::TableExprNode ( const Float value)

§ TableExprNode() [7/42]

casacore::TableExprNode::TableExprNode ( const Double value)

§ TableExprNode() [8/42]

casacore::TableExprNode::TableExprNode ( const Complex &  value)

§ TableExprNode() [9/42]

casacore::TableExprNode::TableExprNode ( const DComplex &  value)

§ TableExprNode() [10/42]

casacore::TableExprNode::TableExprNode ( const String value)

§ TableExprNode() [11/42]

casacore::TableExprNode::TableExprNode ( const std::string &  value)

§ TableExprNode() [12/42]

casacore::TableExprNode::TableExprNode ( const char *  )

§ TableExprNode() [13/42]

casacore::TableExprNode::TableExprNode ( const Regex value)

§ TableExprNode() [14/42]

casacore::TableExprNode::TableExprNode ( const StringDistance value)

§ TableExprNode() [15/42]

casacore::TableExprNode::TableExprNode ( const TaqlRegex value)

§ TableExprNode() [16/42]

casacore::TableExprNode::TableExprNode ( const MVTime value)

§ TableExprNode() [17/42]

casacore::TableExprNode::TableExprNode ( const Array< Bool > &  value)

§ TableExprNode() [18/42]

casacore::TableExprNode::TableExprNode ( const Array< uChar > &  value)

§ TableExprNode() [19/42]

casacore::TableExprNode::TableExprNode ( const Array< Short > &  value)

§ TableExprNode() [20/42]

casacore::TableExprNode::TableExprNode ( const Array< uShort > &  value)

§ TableExprNode() [21/42]

casacore::TableExprNode::TableExprNode ( const Array< Int > &  value)

§ TableExprNode() [22/42]

casacore::TableExprNode::TableExprNode ( const Array< uInt > &  value)

§ TableExprNode() [23/42]

casacore::TableExprNode::TableExprNode ( const Array< Float > &  value)

§ TableExprNode() [24/42]

casacore::TableExprNode::TableExprNode ( const Array< Double > &  value)

§ TableExprNode() [25/42]

casacore::TableExprNode::TableExprNode ( const Array< Complex > &  value)

§ TableExprNode() [26/42]

casacore::TableExprNode::TableExprNode ( const Array< DComplex > &  value)

§ TableExprNode() [27/42]

casacore::TableExprNode::TableExprNode ( const Array< String > &  value)

§ TableExprNode() [28/42]

casacore::TableExprNode::TableExprNode ( const Array< MVTime > &  value)

§ TableExprNode() [29/42]

casacore::TableExprNode::TableExprNode ( const MArray< Bool > &  value)

§ TableExprNode() [30/42]

casacore::TableExprNode::TableExprNode ( const MArray< uChar > &  value)

§ TableExprNode() [31/42]

casacore::TableExprNode::TableExprNode ( const MArray< Short > &  value)

§ TableExprNode() [32/42]

casacore::TableExprNode::TableExprNode ( const MArray< uShort > &  value)

§ TableExprNode() [33/42]

casacore::TableExprNode::TableExprNode ( const MArray< Int > &  value)

§ TableExprNode() [34/42]

casacore::TableExprNode::TableExprNode ( const MArray< uInt > &  value)

§ TableExprNode() [35/42]

casacore::TableExprNode::TableExprNode ( const MArray< Float > &  value)

§ TableExprNode() [36/42]

casacore::TableExprNode::TableExprNode ( const MArray< Double > &  value)

§ TableExprNode() [37/42]

casacore::TableExprNode::TableExprNode ( const MArray< Complex > &  value)

§ TableExprNode() [38/42]

casacore::TableExprNode::TableExprNode ( const MArray< DComplex > &  value)

§ TableExprNode() [39/42]

casacore::TableExprNode::TableExprNode ( const MArray< String > &  value)

§ TableExprNode() [40/42]

casacore::TableExprNode::TableExprNode ( const MArray< MVTime > &  value)

§ TableExprNode() [41/42]

casacore::TableExprNode::TableExprNode ( TableExprNodeRep )

Construct a node from a node representation.

§ TableExprNode() [42/42]

casacore::TableExprNode::TableExprNode ( const TableExprNode )

copy constructor (reference semantics).

§ ~TableExprNode()

casacore::TableExprNode::~TableExprNode ( )

The destructor deletes all the underlying TableExprNode objects,.

Member Function Documentation

§ adaptUnit()

void casacore::TableExprNode::adaptUnit ( const Unit )

Adapt the unit of the expression to the given unit (if not empty).

Referenced by nrow().

§ applySelection()

void casacore::TableExprNode::applySelection ( const Vector< uInt > &  rownrs)
inline

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 959 of file ExprNode.h.

References casacore::TableExprNodeRep::applySelection(), and node_p.

§ checkTableSize()

Bool casacore::TableExprNode::checkTableSize ( const Table table,
Bool  canBeConst 
) const

Check if tables used in expression have the same number of rows as the given table.

Referenced by nrow().

§ convertBlockTEN()

static PtrBlock<TableExprNodeRep*> casacore::TableExprNode::convertBlockTEN ( Block< TableExprNode > &  nodes)
staticprivate

convert Block of TableExprNode to PtrBlock of TableExprNodeRep*.

Referenced by nrow().

§ dataType()

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.

Referenced by unit().

§ disableApplySelection()

void casacore::TableExprNode::disableApplySelection ( )
inline

Do not apply the selection.

Definition at line 954 of file ExprNode.h.

References casacore::TableExprNodeRep::disableApplySelection(), and node_p.

§ findLastKeyRec()

static TableRecord* casacore::TableExprNode::findLastKeyRec ( const TableRecord keyset,
const Vector< String > &  fieldNames,
String fullName 
)
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.

Referenced by nrow().

§ get() [1/19]

void casacore::TableExprNode::get ( const TableExprId id,
Bool value 
) const
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 1211 of file ExprNode.h.

References casacore::TableExprNodeRep::getBool(), and node_p.

§ get() [2/19]

void casacore::TableExprNode::get ( const TableExprId id,
Int64 value 
) const
inline

Definition at line 1213 of file ExprNode.h.

References casacore::TableExprNodeRep::getInt(), and node_p.

§ get() [3/19]

void casacore::TableExprNode::get ( const TableExprId id,
Double value 
) const
inline

Definition at line 1215 of file ExprNode.h.

References casacore::TableExprNodeRep::getDouble(), and node_p.

§ get() [4/19]

void casacore::TableExprNode::get ( const TableExprId id,
DComplex &  value 
) const
inline

Definition at line 1217 of file ExprNode.h.

References casacore::TableExprNodeRep::getDComplex(), and node_p.

§ get() [5/19]

void casacore::TableExprNode::get ( const TableExprId id,
String value 
) const
inline

Definition at line 1219 of file ExprNode.h.

References casacore::TableExprNodeRep::getString(), and node_p.

§ get() [6/19]

void casacore::TableExprNode::get ( const TableExprId id,
TaqlRegex value 
) const
inline

Definition at line 1221 of file ExprNode.h.

References casacore::TableExprNodeRep::getRegex(), and node_p.

§ get() [7/19]

void casacore::TableExprNode::get ( const TableExprId id,
MVTime value 
) const
inline

Definition at line 1223 of file ExprNode.h.

References casacore::TableExprNodeRep::getDate(), and node_p.

§ get() [8/19]

void casacore::TableExprNode::get ( const TableExprId id,
MArray< Bool > &  value 
) const
inline

Definition at line 1225 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayBool(), and node_p.

§ get() [9/19]

void casacore::TableExprNode::get ( const TableExprId id,
MArray< Int64 > &  value 
) const
inline

Definition at line 1228 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayInt(), and node_p.

§ get() [10/19]

void casacore::TableExprNode::get ( const TableExprId id,
MArray< Double > &  value 
) const
inline

Definition at line 1231 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayDouble(), and node_p.

§ get() [11/19]

void casacore::TableExprNode::get ( const TableExprId id,
MArray< DComplex > &  value 
) const
inline

Definition at line 1234 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayDComplex(), and node_p.

§ get() [12/19]

void casacore::TableExprNode::get ( const TableExprId id,
MArray< String > &  value 
) const
inline

Definition at line 1237 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayString(), and node_p.

§ get() [13/19]

void casacore::TableExprNode::get ( const TableExprId id,
MArray< MVTime > &  value 
) const
inline

Definition at line 1240 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayDate(), and node_p.

§ get() [14/19]

void casacore::TableExprNode::get ( const TableExprId id,
Array< Bool > &  value 
) const
inline

§ get() [15/19]

void casacore::TableExprNode::get ( const TableExprId id,
Array< Int64 > &  value 
) const
inline

§ get() [16/19]

void casacore::TableExprNode::get ( const TableExprId id,
Array< Double > &  value 
) const
inline

§ get() [17/19]

void casacore::TableExprNode::get ( const TableExprId id,
Array< DComplex > &  value 
) const
inline

§ get() [18/19]

void casacore::TableExprNode::get ( const TableExprId id,
Array< String > &  value 
) const
inline

Definition at line 1255 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayString(), and node_p.

§ get() [19/19]

void casacore::TableExprNode::get ( const TableExprId id,
Array< MVTime > &  value 
) const
inline

Definition at line 1258 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayDate(), and node_p.

§ getArrayBool()

Array< Bool > casacore::TableExprNode::getArrayBool ( const TableExprId id) const
inline

Definition at line 1271 of file ExprNode.h.

References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayBool(), and node_p.

Referenced by nrow().

§ getArrayDate()

Array< MVTime > casacore::TableExprNode::getArrayDate ( const TableExprId id) const
inline

Definition at line 1281 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayDate(), and node_p.

Referenced by nrow().

§ getArrayDComplex()

Array< DComplex > casacore::TableExprNode::getArrayDComplex ( const TableExprId id) const
inline

Definition at line 1277 of file ExprNode.h.

References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayDComplex(), and node_p.

Referenced by nrow().

§ getArrayDouble()

Array< Double > casacore::TableExprNode::getArrayDouble ( const TableExprId id) const
inline

Definition at line 1275 of file ExprNode.h.

References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayDouble(), and node_p.

Referenced by nrow().

§ getArrayInt()

Array< Int64 > casacore::TableExprNode::getArrayInt ( const TableExprId id) const
inline

Definition at line 1273 of file ExprNode.h.

References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayInt(), and node_p.

Referenced by nrow().

§ getArrayString()

Array< String > casacore::TableExprNode::getArrayString ( const TableExprId id) const
inline

Definition at line 1279 of file ExprNode.h.

References casacore::TableExprNodeRep::getArrayString(), and node_p.

Referenced by nrow().

§ getBool()

Bool casacore::TableExprNode::getBool ( const TableExprId id) const
inline

Definition at line 1261 of file ExprNode.h.

References casacore::TableExprNodeRep::getBool(), and node_p.

Referenced by nrow().

§ getBoolAS()

MArray< Bool > casacore::TableExprNode::getBoolAS ( const TableExprId id) const
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 1283 of file ExprNode.h.

References casacore::TableExprNodeRep::getBoolAS(), and node_p.

Referenced by nrow().

§ getColumnBool()

Array< Bool > casacore::TableExprNode::getColumnBool ( const Vector< uInt > &  rownrs) const
inline

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 1296 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnBool(), and node_p.

Referenced by nrow().

§ getColumnComplex()

Array< Complex > casacore::TableExprNode::getColumnComplex ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1312 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnComplex(), and node_p.

Referenced by nrow().

§ getColumnDataType()

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.

Referenced by nrow().

§ getColumnDComplex()

Array< DComplex > casacore::TableExprNode::getColumnDComplex ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1314 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnDComplex(), and node_p.

Referenced by nrow().

§ getColumnDouble()

Array< Double > casacore::TableExprNode::getColumnDouble ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1310 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnDouble(), and node_p.

Referenced by nrow().

§ getColumnFloat()

Array< Float > casacore::TableExprNode::getColumnFloat ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1308 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnFloat(), and node_p.

Referenced by nrow().

§ getColumnInt()

Array< Int > casacore::TableExprNode::getColumnInt ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1304 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnInt(), and node_p.

Referenced by nrow().

§ getColumnShort()

Array< Short > casacore::TableExprNode::getColumnShort ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1300 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnShort(), and node_p.

Referenced by nrow().

§ getColumnString()

Array< String > casacore::TableExprNode::getColumnString ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1316 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnString(), and node_p.

Referenced by nrow().

§ getColumnuChar()

Array< uChar > casacore::TableExprNode::getColumnuChar ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1298 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnuChar(), and node_p.

Referenced by nrow().

§ getColumnuInt()

Array< uInt > casacore::TableExprNode::getColumnuInt ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1306 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnuInt(), and node_p.

Referenced by nrow().

§ getColumnuShort()

Array< uShort > casacore::TableExprNode::getColumnuShort ( const Vector< uInt > &  rownrs) const
inline

Definition at line 1302 of file ExprNode.h.

References casacore::TableExprNodeRep::getColumnuShort(), and node_p.

Referenced by nrow().

§ getDateAS()

MArray< MVTime > casacore::TableExprNode::getDateAS ( const TableExprId id) const
inline

Definition at line 1293 of file ExprNode.h.

References casacore::TableExprNodeRep::getDateAS(), and node_p.

Referenced by nrow().

§ getDComplex()

DComplex casacore::TableExprNode::getDComplex ( const TableExprId id) const
inline

Definition at line 1267 of file ExprNode.h.

References casacore::TableExprNodeRep::getDComplex(), and node_p.

Referenced by nrow().

§ getDComplexAS()

MArray< DComplex > casacore::TableExprNode::getDComplexAS ( const TableExprId id) const
inline

Definition at line 1289 of file ExprNode.h.

References casacore::TableExprNodeRep::getDComplexAS(), and node_p.

Referenced by nrow().

§ getDouble()

Double casacore::TableExprNode::getDouble ( const TableExprId id) const
inline

Definition at line 1265 of file ExprNode.h.

References casacore::TableExprNodeRep::getDouble(), and node_p.

Referenced by nrow().

§ getDoubleAS()

MArray< Double > casacore::TableExprNode::getDoubleAS ( const TableExprId id) const
inline

Definition at line 1287 of file ExprNode.h.

References casacore::TableExprNodeRep::getDoubleAS(), and node_p.

Referenced by nrow().

§ getInt()

Int64 casacore::TableExprNode::getInt ( const TableExprId id) const
inline

Definition at line 1263 of file ExprNode.h.

References casacore::TableExprNodeRep::getInt(), and node_p.

Referenced by nrow().

§ getIntAS()

MArray< Int64 > casacore::TableExprNode::getIntAS ( const TableExprId id) const
inline

Definition at line 1285 of file ExprNode.h.

References casacore::TableExprNodeRep::getIntAS(), and node_p.

Referenced by nrow().

§ getNodeRep()

const TableExprNodeRep * casacore::TableExprNode::getNodeRep ( ) const
inline

returns const pointer to the representation-object of it

Definition at line 2168 of file ExprNode.h.

References node_p.

Referenced by nrow().

§ getRep()

TableExprNodeRep * casacore::TableExprNode::getRep ( )
inlineprivate

returns non-const pointer to the representation-object of it

Definition at line 2172 of file ExprNode.h.

References node_p.

Referenced by nrow().

§ getString()

String casacore::TableExprNode::getString ( const TableExprId id) const
inline

Definition at line 1269 of file ExprNode.h.

References casacore::TableExprNodeRep::getString(), and node_p.

Referenced by nrow().

§ getStringAS()

MArray< String > casacore::TableExprNode::getStringAS ( const TableExprId id) const
inline

Definition at line 1291 of file ExprNode.h.

References casacore::TableExprNodeRep::getStringAS(), and node_p.

Referenced by nrow().

§ in() [1/2]

TableExprNode casacore::TableExprNode::in ( const TableExprNode array,
const TaQLStyle style = TaQLStyle(0) 
) const
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 1390 of file ExprNode.h.

References newIN(), and node_p.

§ in() [2/2]

TableExprNode casacore::TableExprNode::in ( const TableExprNodeSet set,
const TaQLStyle = TaQLStyle(0) 
) const

§ isNull()

Bool casacore::TableExprNode::isNull ( ) const
inline

Does the node contain no actual node?

Definition at line 950 of file ExprNode.h.

References node_p.

Referenced by casacore::TaQLResult::isTable().

§ isScalar()

Bool casacore::TableExprNode::isScalar ( ) const
inline

Is the expression a scalar?

Definition at line 973 of file ExprNode.h.

References node_p, casacore::TableExprNodeRep::valueType(), and casacore::TableExprNodeRep::VTScalar.

§ newAND()

TableExprNodeRep* casacore::TableExprNode::newAND ( TableExprNodeRep right) const
private

Referenced by nrow().

§ newArrayPartNode()

static TableExprNode casacore::TableExprNode::newArrayPartNode ( const TableExprNode arrayNode,
const TableExprNodeSet indices,
const TaQLStyle = TaQLStyle(0) 
)
static

Create ArrayElement node for the given array with the given index.

The origin is 0 for C++ and 1 for TaQL.

Referenced by nrow(), and operator()().

§ newBitAnd()

TableExprNodeRep* casacore::TableExprNode::newBitAnd ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator &().

§ newBitOr()

TableExprNodeRep* casacore::TableExprNode::newBitOr ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator|().

§ newBitXor()

TableExprNodeRep* casacore::TableExprNode::newBitXor ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator^().

§ newColumnNode()

static TableExprNode casacore::TableExprNode::newColumnNode ( const Table tab,
const String name,
const Vector< String > &  fieldNames 
)
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. isArray indicates if the column should be an array column.

Referenced by nrow().

§ newConeNode() [1/3]

static TableExprNode casacore::TableExprNode::newConeNode ( TableExprFuncNode::FunctionType  ,
const TableExprNodeSet set,
uInt  origin = 0 
)
static

Create cone function node of the given type with the given arguments.

Referenced by casacore::anyCone(), casacore::cones(), casacore::findCone(), and nrow().

§ newConeNode() [2/3]

static TableExprNode casacore::TableExprNode::newConeNode ( TableExprFuncNode::FunctionType  ,
const TableExprNode node1,
const TableExprNode node2 
)
static

§ newConeNode() [3/3]

static TableExprNode casacore::TableExprNode::newConeNode ( TableExprFuncNode::FunctionType  ,
const TableExprNode node1,
const TableExprNode node2,
const TableExprNode node3 
)
static

§ newDivide()

TableExprNodeRep* casacore::TableExprNode::newDivide ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator/().

§ newEQ()

TableExprNodeRep* casacore::TableExprNode::newEQ ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator==().

§ newFunctionNode() [1/6]

static TableExprNode casacore::TableExprNode::newFunctionNode ( TableExprFuncNode::FunctionType  ,
const TableExprNodeSet set,
const Table table,
const TaQLStyle = TaQLStyle(0) 
)
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(), nrow(), 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().

§ newFunctionNode() [2/6]

static TableExprNode casacore::TableExprNode::newFunctionNode ( TableExprFuncNode::FunctionType  ,
const TableExprNode node 
)
static

§ newFunctionNode() [3/6]

static TableExprNode casacore::TableExprNode::newFunctionNode ( TableExprFuncNode::FunctionType  ,
const TableExprNode node1,
const TableExprNode node2 
)
static

§ newFunctionNode() [4/6]

static TableExprNode casacore::TableExprNode::newFunctionNode ( TableExprFuncNode::FunctionType  ,
const TableExprNode node1,
const TableExprNode node2,
const TableExprNode node3 
)
static

§ newFunctionNode() [5/6]

static TableExprNode casacore::TableExprNode::newFunctionNode ( TableExprFuncNode::FunctionType  ,
const TableExprNode array,
const TableExprNodeSet axes 
)
static

§ newFunctionNode() [6/6]

static TableExprNode casacore::TableExprNode::newFunctionNode ( TableExprFuncNode::FunctionType  ,
const TableExprNode array,
const TableExprNode node,
const TableExprNodeSet axes 
)
static

§ newGE()

TableExprNodeRep* casacore::TableExprNode::newGE ( TableExprNodeRep right) const
private

§ newGT()

TableExprNodeRep* casacore::TableExprNode::newGT ( TableExprNodeRep right) const
private

§ newIN()

TableExprNodeRep* casacore::TableExprNode::newIN ( TableExprNodeRep right,
const TaQLStyle  
) const
private

Referenced by in(), and nrow().

§ newKeyConst()

static TableExprNode casacore::TableExprNode::newKeyConst ( const TableRecord ,
const Vector< String > &  fieldNames 
)
static

Create a TableExprNodeConst for a table keyword (which is handled as a constant).

Referenced by nrow().

§ newMinus()

TableExprNodeRep* casacore::TableExprNode::newMinus ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator-().

§ newModulo()

TableExprNodeRep* casacore::TableExprNode::newModulo ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator%().

§ newNE()

TableExprNodeRep* casacore::TableExprNode::newNE ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator!=().

§ newOR()

TableExprNodeRep* casacore::TableExprNode::newOR ( TableExprNodeRep right) const
private

Referenced by nrow().

§ newPlus()

TableExprNodeRep* casacore::TableExprNode::newPlus ( TableExprNodeRep right) const
private

Construct a new node for the given operation.

Referenced by nrow(), and casacore::operator+().

§ newRandomNode()

static TableExprNode casacore::TableExprNode::newRandomNode ( const Table table)
static

Create rand() function node.

Referenced by nrow().

§ newRowidNode()

static TableExprNode casacore::TableExprNode::newRowidNode ( const Table table)
static

Create rowid() function node.

Origin is always 0.

Referenced by nrow().

§ newRownrNode()

static TableExprNode casacore::TableExprNode::newRownrNode ( const Table table,
uInt  origin 
)
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 nrow().

§ newTimes()

TableExprNodeRep* casacore::TableExprNode::newTimes ( TableExprNodeRep right) const
private

Referenced by nrow(), and casacore::operator*().

§ newUDFNode()

static TableExprNode casacore::TableExprNode::newUDFNode ( const String name,
const TableExprNodeSet set,
const Table table,
const TaQLStyle = TaQLStyle(0) 
)
static

Create a user defined function node.

Referenced by nrow().

§ nrow()

uInt casacore::TableExprNode::nrow ( ) const
inline

§ operator!()

TableExprNode casacore::TableExprNode::operator! ( ) const

Unary NOT-operator on boolean TableExprNode's.

§ operator()()

TableExprNode casacore::TableExprNode::operator() ( const TableExprNodeSet indices)
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 1395 of file ExprNode.h.

References newArrayPartNode().

§ operator+()

TableExprNode casacore::TableExprNode::operator+ ( ) const

Unary operators on numeric TableExprNode's.

§ operator-()

TableExprNode casacore::TableExprNode::operator- ( ) const

§ operator=()

TableExprNode& casacore::TableExprNode::operator= ( const TableExprNode )

Assignment (reference semantics).

§ operator~()

TableExprNode casacore::TableExprNode::operator~ ( ) const

Unary bitwise negate-operator on integer TableExprNode's.

§ ranges()

void casacore::TableExprNode::ranges ( Block< TableExprRange > &  blrange)
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 1203 of file ExprNode.h.

References node_p, and casacore::TableExprNodeRep::ranges().

Referenced by nrow().

§ show()

void casacore::TableExprNode::show ( ostream &  os) const
inline

Show the tree.

Definition at line 2164 of file ExprNode.h.

References node_p, and casacore::TableExprNodeRep::show().

Referenced by nrow().

§ table()

const Table & casacore::TableExprNode::table ( ) const
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 1207 of file ExprNode.h.

References node_p, and casacore::TableExprNodeRep::table().

Referenced by nrow().

§ throwInvDT()

static void casacore::TableExprNode::throwInvDT ( const String message)
static

Throw invalid data type exception.

Referenced by nrow().

§ unit()

const Unit& casacore::TableExprNode::unit ( ) const
inline

Get the unit of the expression.

Definition at line 963 of file ExprNode.h.

References dataType(), node_p, and casacore::TableExprNodeRep::unit().

§ useUnit()

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.

Friends And Related Function Documentation

§ abs

TableExprNode abs ( const TableExprNode node)
friend

Definition at line 1556 of file ExprNode.h.

§ acos

TableExprNode acos ( const TableExprNode node)
friend

Definition at line 1528 of file ExprNode.h.

§ all

TableExprNode all ( const TableExprNode array)
friend

Definition at line 1864 of file ExprNode.h.

§ alls

TableExprNode alls ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1955 of file ExprNode.h.

§ amplitude

TableExprNode amplitude ( const TableExprNode node)
friend

The amplitude (i.e.

sqrt(re*re + im*im)) of a complex node. This is a synonym for function abs. Defined for scalars and arrays.

Definition at line 1604 of file ExprNode.h.

§ angdist

TableExprNode angdist ( const TableExprNode pos1,
const TableExprNode pos2 
)
friend

Angular distance between positions.

Both arguments have to be arrays. If both arrays contain 2 values (ra and dec), the result is a scalar. Otherwise the arrays have to contain a multiple of 2 values and the result is a 2-dim array giving the distance of each position in the first array to each position in the second array.

Definition at line 1427 of file ExprNode.h.

§ any

TableExprNode any ( const TableExprNode array)
friend

Definition at line 1860 of file ExprNode.h.

§ anyCone [1/2]

TableExprNode anyCone ( const TableExprNode sourcePos,
const TableExprNode cones 
)
friend

The result is always a Bool scalar telling if any cone contains the source.

Definition at line 1445 of file ExprNode.h.

§ anyCone [2/2]

TableExprNode anyCone ( const TableExprNode sourcePos,
const TableExprNode conePos,
const TableExprNode radii 
)
friend

Definition at line 1464 of file ExprNode.h.

§ anys

TableExprNode anys ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1949 of file ExprNode.h.

§ arg

TableExprNode arg ( const TableExprNode node)
friend

The arg (i.e.

atan2(im, re)) of a complex node. Defined for scalars and arrays.

Definition at line 1608 of file ExprNode.h.

§ array

TableExprNode array ( const TableExprNode values,
const TableExprNodeSet shape 
)
friend

Create an array of the given shape and fill it with the values.

The values array is rewound as needed.

Definition at line 2093 of file ExprNode.h.

§ arrayData

TableExprNode arrayData ( const TableExprNode array)
friend

Get the data array of a masked array.

Definition at line 2105 of file ExprNode.h.

§ arrayFlatten

TableExprNode arrayFlatten ( const TableExprNode array)
friend

Flatten a masked array (get unmasked elements).

Definition at line 2115 of file ExprNode.h.

§ arrayMask

TableExprNode arrayMask ( const TableExprNode array)
friend

Get the mask of a masked array.

If the array has no mask, it return an array with all False values.

Definition at line 2110 of file ExprNode.h.

§ asin

TableExprNode asin ( const TableExprNode node)
friend

Transcendental functions applied to to nodes containing scalars or arrays with double values.

They are invalid for Complex nodes.

Definition at line 1532 of file ExprNode.h.

§ atan

TableExprNode atan ( const TableExprNode node)
friend

Definition at line 1536 of file ExprNode.h.

§ atan2

TableExprNode atan2 ( const TableExprNode y,
const TableExprNode x 
)
friend

Definition at line 1540 of file ExprNode.h.

§ avdev

TableExprNode avdev ( const TableExprNode array)
friend

Definition at line 1839 of file ExprNode.h.

§ avdevs

TableExprNode avdevs ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1924 of file ExprNode.h.

§ boolean

TableExprNode boolean ( const TableExprNode node)
friend

Convert numeric or string value to bool (0, no, false, - means false)

Definition at line 1596 of file ExprNode.h.

§ capitalize

TableExprNode capitalize ( const TableExprNode node)
friend

Definition at line 1642 of file ExprNode.h.

§ cdate

TableExprNode cdate ( const TableExprNode node)
friend

Definition at line 1709 of file ExprNode.h.

§ cdow

TableExprNode cdow ( const TableExprNode node)
friend

Definition at line 1701 of file ExprNode.h.

§ ceil

TableExprNode ceil ( const TableExprNode node)
friend

Definition at line 1552 of file ExprNode.h.

§ cmonth

TableExprNode cmonth ( const TableExprNode node)
friend

Definition at line 1691 of file ExprNode.h.

§ cones [1/2]

TableExprNode cones ( const TableExprNode sourcePos,
const TableExprNode cones 
)
friend

Cone search; test if the position of a source is inside a cone.


Argument sourcePos must be a double array containing two values (ra and dec of source) in radians.
Argument cones must be a double array specifying the position of the cone centers and radii in radians. So the array must contain three values (ra,dec,radius) or a multiple of it.

The result is a bool array telling for each cone if it contains the source. If there is only one cone, the result is a scalar.

Definition at line 1439 of file ExprNode.h.

§ cones [2/2]

TableExprNode cones ( const TableExprNode sourcePos,
const TableExprNode conePos,
const TableExprNode radii 
)
friend

Cone search as above.

However, the cone positions and radii are specified separately and (virtually) a larger array containing every combination of position/radius is formed.

Definition at line 1457 of file ExprNode.h.

§ conj

TableExprNode conj ( const TableExprNode node)
friend

The complex conjugate of a complex node.

Defined for scalars and arrays.

Definition at line 1600 of file ExprNode.h.

§ cos

TableExprNode cos ( const TableExprNode node)
friend

Definition at line 1478 of file ExprNode.h.

§ cosh

TableExprNode cosh ( const TableExprNode node)
friend

Definition at line 1482 of file ExprNode.h.

§ ctime

TableExprNode ctime ( const TableExprNode node)
friend

Definition at line 1713 of file ExprNode.h.

§ ctodt

TableExprNode ctodt ( const TableExprNode node)
friend

Definition at line 1705 of file ExprNode.h.

§ cube

TableExprNode cube ( const TableExprNode node)
friend

Definition at line 1515 of file ExprNode.h.

§ date

TableExprNode date ( const TableExprNode node)
friend

Definition at line 1675 of file ExprNode.h.

§ datetime

TableExprNode datetime ( const TableExprNode node)
friend

Functions for date-values.

Defined for scalars and arrays.

Definition at line 1661 of file ExprNode.h.

§ day

TableExprNode day ( const TableExprNode node)
friend

Definition at line 1687 of file ExprNode.h.

§ diagonal [1/3]

TableExprNode diagonal ( const TableExprNode array)
friend

Get the diagonal of a (masked) array; If the array is not a Matrix, it will take the diagonals of the subarrays given by the two axes in the axes argument.

Those axes have to have the same length (thus each subarray is a Matrix). If no axes are given, they default to the first two axes.
The diag argument tells which diagonal to take. 0 is the main diagonal, >0 is above main diagonal, <0 is below.

Definition at line 2133 of file ExprNode.h.

§ diagonal [2/3]

TableExprNode diagonal ( const TableExprNode array,
const TableExprNode firstAxis 
)
friend

§ diagonal [3/3]

TableExprNode diagonal ( const TableExprNode array,
const TableExprNode firstAxis,
const TableExprNode diag 
)
friend

§ downcase

TableExprNode downcase ( const TableExprNode node)
friend

Definition at line 1637 of file ExprNode.h.

§ exp

TableExprNode exp ( const TableExprNode node)
friend

Definition at line 1486 of file ExprNode.h.

§ findCone [1/2]

TableExprNode findCone ( const TableExprNode sourcePos,
const TableExprNode cones 
)
friend

The sourcePos can contain multiple sources.

The result is a double array giving the index of the first cone containing the corresponding source. If there is one source, the result is a double scalar.

Definition at line 1451 of file ExprNode.h.

§ findCone [2/2]

TableExprNode findCone ( const TableExprNode sourcePos,
const TableExprNode conePos,
const TableExprNode radii 
)
friend

Definition at line 1471 of file ExprNode.h.

§ floor

TableExprNode floor ( const TableExprNode node)
friend

Definition at line 1560 of file ExprNode.h.

§ fmod

TableExprNode fmod ( const TableExprNode x,
const TableExprNode y 
)
friend

Definition at line 1564 of file ExprNode.h.

§ formComplex [1/2]

TableExprNode formComplex ( const TableExprNode real,
const TableExprNode imag 
)
friend

Form a complex number from two Doubles.

One or both arguments can be scalar or array.

Definition at line 1616 of file ExprNode.h.

§ formComplex [2/2]

TableExprNode formComplex ( const TableExprNode node)
friend

Form a complex number from a string.

Defined for scalars and arrays.

Definition at line 1622 of file ExprNode.h.

§ fractile

TableExprNode fractile ( const TableExprNode array,
const TableExprNode fraction 
)
friend

Definition at line 1854 of file ExprNode.h.

§ fractiles

TableExprNode fractiles ( const TableExprNode array,
const TableExprNode fraction,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1942 of file ExprNode.h.

§ iif

TableExprNode iif ( const TableExprNode condition,
const TableExprNode arg1,
const TableExprNode arg2 
)
friend

Function resembling the ternary ?: construct in C++.

The argument "condition" has to be a Bool value. If an element in "condition" is True, the corresponding element from "arg1" is taken, otherwise it is taken from "arg2". The arguments can be scalars or array or any combination.

Definition at line 2155 of file ExprNode.h.

§ imag

TableExprNode imag ( const TableExprNode node)
friend

The imaginary part of a complex node.

Defined for scalars and arrays.

Definition at line 1588 of file ExprNode.h.

§ integer

TableExprNode integer ( const TableExprNode node)
friend

Convert double, bool, or string to int (using floor).

Definition at line 1592 of file ExprNode.h.

§ isdefined

TableExprNode isdefined ( const TableExprNode array)
friend

Function operating on a field resulting in a bool scalar.

It can be used to test if a column has an array in the current row. It can also be used to test if a record contains a field.

Definition at line 2139 of file ExprNode.h.

§ isFinite

TableExprNode isFinite ( const TableExprNode node)
friend

Function to test if a scalar or array is finite.

It results in a Bool scalar or array.

Definition at line 1794 of file ExprNode.h.

§ isNaN

TableExprNode isNaN ( const TableExprNode node)
friend

Function to test if a scalar or array is NaN (not-a-number).

It results in a Bool scalar or array.

Definition at line 1786 of file ExprNode.h.

§ log

TableExprNode log ( const TableExprNode node)
friend

Definition at line 1490 of file ExprNode.h.

§ log10

TableExprNode log10 ( const TableExprNode node)
friend

Definition at line 1494 of file ExprNode.h.

§ ltrim

TableExprNode ltrim ( const TableExprNode node)
friend

Definition at line 1752 of file ExprNode.h.

§ marray

TableExprNode marray ( const TableExprNode array,
const TableExprNode mask 
)
friend

Form a masked array.

Definition at line 2099 of file ExprNode.h.

§ max [1/2]

TableExprNode max ( const TableExprNode a,
const TableExprNode b 
)
friend

Definition at line 1580 of file ExprNode.h.

§ max [2/2]

TableExprNode max ( const TableExprNode array)
friend

Definition at line 1804 of file ExprNode.h.

§ maxs

TableExprNode maxs ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1900 of file ExprNode.h.

§ mean

TableExprNode mean ( const TableExprNode array)
friend

Definition at line 1824 of file ExprNode.h.

§ means

TableExprNode means ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1906 of file ExprNode.h.

§ median

TableExprNode median ( const TableExprNode array)
friend

Definition at line 1849 of file ExprNode.h.

§ medians

TableExprNode medians ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1936 of file ExprNode.h.

§ min [1/2]

TableExprNode min ( const TableExprNode a,
const TableExprNode b 
)
friend

Minimum or maximum of 2 nodes.

Makes sense for numeric and String values. For Complex values the norm is compared. One or both arguments can be scalar or array.

Definition at line 1576 of file ExprNode.h.

§ min [2/2]

TableExprNode min ( const TableExprNode array)
friend

Functions operating on a Double scalar or array resulting in a Double scalar.

Definition at line 1799 of file ExprNode.h.

§ mins

TableExprNode mins ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1894 of file ExprNode.h.

§ mjd

TableExprNode mjd ( const TableExprNode node)
friend

Definition at line 1671 of file ExprNode.h.

§ mjdtodate

TableExprNode mjdtodate ( const TableExprNode node)
friend

Definition at line 1666 of file ExprNode.h.

§ month

TableExprNode month ( const TableExprNode node)
friend

Definition at line 1683 of file ExprNode.h.

§ ndim

TableExprNode ndim ( const TableExprNode array)
friend

Definition at line 2147 of file ExprNode.h.

§ near [1/2]

TableExprNode near ( const TableExprNode left,
const TableExprNode right 
)
friend

Functions to return whether a value is "relatively" near another.

Returns tol > abs(val2 - val1)/max(abs(val1),(val2)). If tol <= 0, returns val1 == val2. If either val is 0.0, takes care of area around the minimum number that can be represented.
The nearAbs functions return whether a value is "absolutely" near another. Returns tol > abs(val2 - val1). Default tolerance is 1.0e-13. They operate on scalars and arrays.

Definition at line 1401 of file ExprNode.h.

§ near [2/2]

TableExprNode near ( const TableExprNode left,
const TableExprNode right,
const TableExprNode tolerance 
)
friend

Definition at line 1407 of file ExprNode.h.

§ nearAbs [1/2]

TableExprNode nearAbs ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1414 of file ExprNode.h.

§ nearAbs [2/2]

TableExprNode nearAbs ( const TableExprNode left,
const TableExprNode right,
const TableExprNode tolerance 
)
friend

Definition at line 1420 of file ExprNode.h.

§ nelements

TableExprNode nelements ( const TableExprNode array)
friend

Functions operating on any scalar or array resulting in a Double scalar.

A scalar has 1 element and dimensionality 0.

Definition at line 2143 of file ExprNode.h.

§ nfalse

TableExprNode nfalse ( const TableExprNode array)
friend

Definition at line 1872 of file ExprNode.h.

§ nfalses

TableExprNode nfalses ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1967 of file ExprNode.h.

§ norm

TableExprNode norm ( const TableExprNode node)
friend

Definition at line 1524 of file ExprNode.h.

§ ntrue

TableExprNode ntrue ( const TableExprNode array)
friend

Definition at line 1868 of file ExprNode.h.

§ ntrues

TableExprNode ntrues ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1961 of file ExprNode.h.

§ operator &

TableExprNode operator& ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1345 of file ExprNode.h.

§ operator &&

TableExprNode operator&& ( const TableExprNode left,
const TableExprNode right 
)
friend

Logical operators to combine boolean TableExprNode's.

A null TableExprNode object is ignored, so it is possible to build up a full expression gradually.

§ operator!=

TableExprNode operator!= ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1365 of file ExprNode.h.

§ operator%

TableExprNode operator% ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1340 of file ExprNode.h.

§ operator*

TableExprNode operator* ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1330 of file ExprNode.h.

§ operator+

TableExprNode operator+ ( const TableExprNode left,
const TableExprNode right 
)
friend

Define all global functions as friends.

Arithmetic operators for numeric TableExprNode's.

  • is also defined for strings (means concatenation).

Definition at line 1320 of file ExprNode.h.

§ operator-

TableExprNode operator- ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1325 of file ExprNode.h.

§ operator/

TableExprNode operator/ ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1335 of file ExprNode.h.

§ operator<

TableExprNode operator< ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1385 of file ExprNode.h.

§ operator<=

TableExprNode operator<= ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1380 of file ExprNode.h.

§ operator==

TableExprNode operator== ( const TableExprNode left,
const TableExprNode right 
)
friend

Comparison operators.

Definition at line 1360 of file ExprNode.h.

§ operator>

TableExprNode operator> ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1370 of file ExprNode.h.

§ operator>=

TableExprNode operator>= ( const TableExprNode left,
const TableExprNode right 
)
friend

Not defined for Bool.

Definition at line 1375 of file ExprNode.h.

§ operator^

TableExprNode operator^ ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1355 of file ExprNode.h.

§ operator|

TableExprNode operator| ( const TableExprNode left,
const TableExprNode right 
)
friend

Definition at line 1350 of file ExprNode.h.

§ operator||

TableExprNode operator|| ( const TableExprNode left,
const TableExprNode right 
)
friend

§ pattern

TableExprNode pattern ( const TableExprNode node)
friend

Definition at line 1651 of file ExprNode.h.

§ phase

TableExprNode phase ( const TableExprNode node)
friend

The phase (i.e.

atan2(im, re)) of a complex node. This is a synonym for function arg. Defined for scalars and arrays.

Definition at line 1612 of file ExprNode.h.

§ pow

TableExprNode pow ( const TableExprNode x,
const TableExprNode exp 
)
friend

Definition at line 1498 of file ExprNode.h.

§ product

TableExprNode product ( const TableExprNode array)
friend

Definition at line 1814 of file ExprNode.h.

§ products

TableExprNode products ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1882 of file ExprNode.h.

§ real

TableExprNode real ( const TableExprNode node)
friend

The real part of a complex node.

Defined for scalars and arrays.

Definition at line 1584 of file ExprNode.h.

§ regex

TableExprNode regex ( const TableExprNode node)
friend

Functions for regular expression matching and pattern matching.

Defined for scalars and arrays.
pattern is for a file name like pattern.
sqlpattern is for an SQL like pattern.

Definition at line 1647 of file ExprNode.h.

§ replace [1/2]

TableExprNode replace ( const TableExprNode str,
const TableExprNode patt 
)
friend

Definition at line 1773 of file ExprNode.h.

§ replace [2/2]

TableExprNode replace ( const TableExprNode str,
const TableExprNode patt,
const TableExprNode repl 
)
friend

Definition at line 1779 of file ExprNode.h.

§ rms

TableExprNode rms ( const TableExprNode array)
friend

Definition at line 1844 of file ExprNode.h.

§ rmss

TableExprNode rmss ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1930 of file ExprNode.h.

§ round

TableExprNode round ( const TableExprNode node)
friend

Definition at line 1548 of file ExprNode.h.

§ rtrim

TableExprNode rtrim ( const TableExprNode node)
friend

Definition at line 1756 of file ExprNode.h.

§ runningAll

TableExprNode runningAll ( const TableExprNode array)
friend

§ runningAny

TableExprNode runningAny ( const TableExprNode array)
friend

§ runningAvdev

TableExprNode runningAvdev ( const TableExprNode array)
friend

§ runningMax

TableExprNode runningMax ( const TableExprNode array)
friend

§ runningMean

TableExprNode runningMean ( const TableExprNode array)
friend

§ runningMedian

TableExprNode runningMedian ( const TableExprNode array)
friend

§ runningMin

TableExprNode runningMin ( const TableExprNode array)
friend

§ runningRms

TableExprNode runningRms ( const TableExprNode array)
friend

§ runningStddev

TableExprNode runningStddev ( const TableExprNode array)
friend

§ runningVariance

TableExprNode runningVariance ( const TableExprNode array)
friend

§ shape

TableExprNode shape ( const TableExprNode array)
friend

Function operating on any scalar or array resulting in a Double array containing the shape.

A scalar has shape [1].

Definition at line 2151 of file ExprNode.h.

§ sign

TableExprNode sign ( const TableExprNode node)
friend

Definition at line 1544 of file ExprNode.h.

§ sin

TableExprNode sin ( const TableExprNode node)
friend

Transcendental functions that can be applied to essentially all numeric nodes containing scalars or arrays.

Definition at line 1502 of file ExprNode.h.

§ sinh

TableExprNode sinh ( const TableExprNode node)
friend

Definition at line 1506 of file ExprNode.h.

§ sqlpattern

TableExprNode sqlpattern ( const TableExprNode node)
friend

Definition at line 1656 of file ExprNode.h.

§ sqrt

TableExprNode sqrt ( const TableExprNode node)
friend

Definition at line 1520 of file ExprNode.h.

§ square

TableExprNode square ( const TableExprNode node)
friend

Definition at line 1510 of file ExprNode.h.

§ stddev

TableExprNode stddev ( const TableExprNode array)
friend

Definition at line 1834 of file ExprNode.h.

§ stddevs

TableExprNode stddevs ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1918 of file ExprNode.h.

§ strlength

TableExprNode strlength ( const TableExprNode node)
friend

String functions on scalars or arrays.

Definition at line 1627 of file ExprNode.h.

§ substr [1/2]

TableExprNode substr ( const TableExprNode str,
const TableExprNode pos 
)
friend

Definition at line 1760 of file ExprNode.h.

§ substr [2/2]

TableExprNode substr ( const TableExprNode str,
const TableExprNode pos,
const TableExprNode npos 
)
friend

Definition at line 1766 of file ExprNode.h.

§ sum

TableExprNode sum ( const TableExprNode array)
friend

Functions operating on a Double or Complex scalar or array resulting in a scalar with the same data type.

Definition at line 1809 of file ExprNode.h.

§ sums

TableExprNode sums ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

The partial version of the functions above.

They are applied to the array subsets defined by the axes in the set using the partialXXX functions in ArrayMath. The axes must be 0-relative.

Definition at line 1876 of file ExprNode.h.

§ sumSquare

TableExprNode sumSquare ( const TableExprNode array)
friend

Definition at line 1819 of file ExprNode.h.

§ sumSquares

TableExprNode sumSquares ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1888 of file ExprNode.h.

§ TableExprNodeRep

friend class TableExprNodeRep
friend

Definition at line 617 of file ExprNode.h.

§ TableParse

friend class TableParse
friend

Definition at line 618 of file ExprNode.h.

§ tan

TableExprNode tan ( const TableExprNode node)
friend

Definition at line 1568 of file ExprNode.h.

§ tanh

TableExprNode tanh ( const TableExprNode node)
friend

Definition at line 1572 of file ExprNode.h.

§ time

TableExprNode time ( const TableExprNode node)
friend

Definition at line 1744 of file ExprNode.h.

§ transpose [1/2]

TableExprNode transpose ( const TableExprNode array)
friend

Transpose all axes of a (masked) array.

Needs an empty axes argument.

Definition at line 2120 of file ExprNode.h.

§ transpose [2/2]

TableExprNode transpose ( const TableExprNode array,
const TableExprNodeSet axes 
)
friend

Definition at line 2127 of file ExprNode.h.

§ trim

TableExprNode trim ( const TableExprNode node)
friend

Definition at line 1748 of file ExprNode.h.

§ upcase

TableExprNode upcase ( const TableExprNode node)
friend

Definition at line 1632 of file ExprNode.h.

§ variance

TableExprNode variance ( const TableExprNode array)
friend

Definition at line 1829 of file ExprNode.h.

§ variances

TableExprNode variances ( const TableExprNode array,
const TableExprNodeSet collapseAxes 
)
friend

Definition at line 1912 of file ExprNode.h.

§ week

TableExprNode week ( const TableExprNode node)
friend

Definition at line 1740 of file ExprNode.h.

§ weekday

TableExprNode weekday ( const TableExprNode node)
friend

Definition at line 1696 of file ExprNode.h.

§ year

TableExprNode year ( const TableExprNode node)
friend

Definition at line 1679 of file ExprNode.h.

Member Data Documentation

§ node_p

TableExprNodeRep* casacore::TableExprNode::node_p
private

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