casacore
Loading...
Searching...
No Matches
ExprNode.h
Go to the documentation of this file.
1//# ExprNode.h: Handle class for a table column expression tree
2//# Copyright (C) 1994,1995,1996,1997,1998,2000,2001,2003
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26#ifndef TABLES_EXPRNODE_H
27#define TABLES_EXPRNODE_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/TaQL/ExprNodeRep.h>
32#include <casacore/tables/TaQL/ExprRange.h>
33#include <casacore/tables/TaQL/ExprFuncNode.h>
34#include <casacore/tables/TaQL/TaQLStyle.h>
35#include <casacore/tables/TaQL/MArray.h>
36#include <casacore/tables/Tables/RowNumbers.h>
37#include <casacore/casa/Arrays/ArrayFwd.h>
38#include <casacore/casa/Utilities/DataType.h>
39#include <casacore/casa/BasicSL/Complex.h>
40
41namespace casacore { //# NAMESPACE CASACORE - BEGIN
42
43//# Forward Declarations
44class Table;
45class String;
46class Regex;
47class StringDistance;
48class Unit;
49class Record;
50class TableRecord;
51class TableExprNodeBinary;
52class TableExprNodeSet;
53template<class T> class Block;
54template<class T> class MArray;
55
56
57// <summary>
58// Handle class for a table column expression tree
59// </summary>
60
61// <use visibility=export>
62
63// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
64// </reviewed>
65
66// <prerequisite>
67//# Classes you should understand before using this one.
68// <li> <linkto class=Table>Table</linkto>
69// <li> Note 199 describing
70// <a href="../notes/199.html">
71// TaQL</a>
72// </prerequisite>
73
74// <etymology>
75// TableExprNode represents a node in the tree reflecting a
76// table select expression.
77// </etymology>
78
79// <synopsis>
80// TableExprNode is the class to store a table select expression,
81// making it possible to select rows from the table. The selected
82// rows form a table which is a view of the original table.
83// <p>
84// TableExprNode is a handle class for the counted referenced class
85// TableExprNodeRep.
86// Classes (like TableExprNodePlusXX) derived from TableExprNodeRep
87// hold the individual
88// nodes in the expression, i.e. the operators and operands. The nodes
89// form a binary tree reflecting the expression.
90// E.g. the expression 2*COLUMN results in the node TableExprNodeTimes
91// with its children TableExprNodeConst and TableExprNodeColumn.
92// Constant subexpressions (like 2*3) are evaluated immediately and
93// only the result is stored as a node.
94// <p>
95// There are a few TableExprNode constructors taking a constant scalar or array.
96// In this way constant value are automatically converted to the
97// appropriate TableExprNodeConst object.
98// <p>
99// The derived classes also reflect the data type of the node.
100// Data types Bool, Int64, Double, DComplex and String are used.
101// Char, uChar, Short, uShort, Int and uInt are converted to Int64,
102// float to Double, and Complex to DComplex.
103// Binary operators +, -, *, /, %, &, }, ^, ==, >=, >, <, <= and != are
104// recognized. Also &&, ||, parentheses and unary +, -, ~ and ! are recognized.
105// For strings the binary operator + can also be used.
106// The operators have the normal C++ precedence.
107// Furthermore functions (such as sin, max, ceil) can be used in an expression.
108// <br>Operator() can be used to take a slice from an array.
109// <p>
110// The Table function col has to be used to create a TableExprNode
111// object for a column in the table. The Table
112// <linkto file="Table.h#keycol">operator()</linkto> can be used
113// the do the actual selection from the top TableExprNode object.
114// </synopsis>
115
116// <example>
117// <srcblock>
118// // Select from table X all rows where column RA<5 and where column
119// // SWITCH is true.
120// Table table("X");
121// Table subtable = table(table.col("RA") < 5 && table.col("SWITCH"));
122//
123// // Select from that result all rows where the concatenation of
124// // the strings in columns STR1 and STR2 is equal to the string
125// // in keyword STRKEY.
126// Table subsub = subtable(subtable.col("STR1") + subtable.col("STR2")
127// == subtable.key("STRKEY"));
128// </srcblock>
129// </example>
130
131// <motivation>
132// Having TableExprNode as a handle class makes it possible to
133// handle temporary objects created by the compiler in a smooth way.
134// TableExprNode and its derivations allow to store an expression
135// before actually evaluating it. This also allows the classes to
136// be used by the table expression parser defined in TableParse and
137// TableGram.
138//
139// For each operator a special derived class is implemented.
140// Another approach could have been to store the operator as
141// a flag and switch on that. However, that causes extra overhead
142// and the C++ virtual function mechanism is the designed for
143// these purposes.
144// </motivation>
145
146// <todo asof="$DATE:$">
147//# A List of bugs, limitations, extensions or planned refinements.
148// <li> add operations on arrays
149// <li> add selection by comparing with a set of values
150// </todo>
151
152
154{
155public:
157
158 // Unary operators on numeric TableExprNode's.
159 // <group>
162 // </group>
163 // Unary NOT-operator on boolean TableExprNode's.
165 // Unary bitwise negate-operator on integer TableExprNode's.
167
168 // Slicing in a node containing an array. It is possible to
169 // address a single pixel or an n-dimensional subarray.
170 // In case of a single pixel the result is a scalar node.
171 // Otherwise the result is an array node with the same dimensionality
172 // as the source.
173 // <br>Note that there exist TableExprNodeSet constructors to
174 // convert an <src>IPosition</src> or <src>Slicer</src> object
175 // automatically to a <src>TableExprNodeSet</src>.
176 // An <src>IPosition</src> addresses a single element and results in
177 // a scalar node, while a <src>Slicer</src> can address multiple
178 // elements and always results in an array node.
180
181 // The IN operator to test if a value is contained in an array or set.
182 // The array can also be a scalar.
183 // <group>
185 const TaQLStyle& = TaQLStyle(0)) const;
187 const TaQLStyle& = TaQLStyle(0)) const;
188 // </group>
189
190 // Use a unit for the given TableExprNode.
191 // Note that if a column has a unit, it is automatically set. In that case
192 // this can be used to convert units.
194
195 // Constructors to convert a constant value to a TableExprNode.
196 // The constructor for char* is also supported to convert a
197 // character-array to a string, since a two step conversion
198 // is not done automatically.
199 // <group>
207 TableExprNode (const Complex& value);
208 TableExprNode (const DComplex& value);
210 TableExprNode (const std::string& value);
211 TableExprNode (const char*);
223 //# The following constructor has to be explicit, othwerwise
224 //# Table(Vector<rownr_t>)
225 //# gives an ambiguous error as the preferred class RowNumbers
226 //# has a similar constructor.
248 // </group>
249
250 // Construct a node from a node representation shared pointer
251 // which increments the reference count.
253
254 // Construct from a node representation. It takes over the pointer, so the
255 // object gets deleted automatically.
258
259 // copy constructor (reference semantics).
261
262 // Assignment (reference semantics).
264
265 // The destructor deletes all the underlying TableExprNode objects,
267
268 // Does the node contain no actual node?
269 Bool isNull() const
270 { return !node_p; }
271
272 // Do not apply the selection.
274 { node_p->disableApplySelection(); }
275
276 // Re-create the column object for a selection of rows.
277 // Nothing is done if the node does not represent a column object.
278 void applySelection (const Vector<rownr_t>& rownrs)
279 { node_p->applySelection (rownrs); }
280
281 // Get the table info of the expression node.
283 { return node_p->getTableInfo(); }
284
285 // Get the table to which the expression node belongs.
286 //# [[deprecated ("Use getTableInfo().table() instead")]]
287 Table table() const
288 __attribute__ ((deprecated ("Use getTableInfo().table() instead")))
289 { return getTableInfo().table(); }
290
291 // Get the unit of the expression.
292 const Unit& unit() const
293 { return node_p->unit(); }
294
295 // Get the attributes of the expression.
296 const Record& attributes() const
297 { return node_p->attributes(); }
298
299 // Get the data type of the expression.
300 // Currently the only possible values are TpBool, TpInt, TpDouble,
301 // TpDComplex, TpString, and TpOther.
302 // The latter is returned for a date or regex.
303 DataType dataType() const;
304
305 // Is the expression a scalar?
307 { return (node_p->valueType() == TableExprNodeRep::VTScalar); }
308
309 // Get the number of rows in the table associated with this expression.
310 // One is returned if the expression is a constant or if no table is
311 // associated with it.
312 rownr_t nrow() const
313 { return node_p->nrow(); }
314
315 // Get a value for this node in the given row.
316 // These functions are implemented in the derived classes and
317 // will usually invoke the get in their children and apply the
318 // operator on the resulting values.
319 // <group>
320 void get (const TableExprId& id, Bool& value) const;
321 void get (const TableExprId& id, Int64& value) const;
322 void get (const TableExprId& id, Double& value) const;
323 void get (const TableExprId& id, DComplex& value) const;
324 void get (const TableExprId& id, String& value) const;
325 void get (const TableExprId& id, TaqlRegex& value) const;
326 void get (const TableExprId& id, MVTime& value) const;
327 void get (const TableExprId& id, MArray<Bool>& value) const;
328 void get (const TableExprId& id, MArray<Int64>& value) const;
329 void get (const TableExprId& id, MArray<Double>& value) const;
330 void get (const TableExprId& id, MArray<DComplex>& value) const;
331 void get (const TableExprId& id, MArray<String>& value) const;
332 void get (const TableExprId& id, MArray<MVTime>& value) const;
333 void get (const TableExprId& id, Array<Bool>& value) const;
334 void get (const TableExprId& id, Array<Int64>& value) const;
335 void get (const TableExprId& id, Array<Double>& value) const;
336 void get (const TableExprId& id, Array<DComplex>& value) const;
337 void get (const TableExprId& id, Array<String>& value) const;
338 void get (const TableExprId& id, Array<MVTime>& value) const;
339 Bool getBool (const TableExprId& id) const;
340 Int64 getInt (const TableExprId& id) const;
341 Double getDouble (const TableExprId& id) const;
342 DComplex getDComplex (const TableExprId& id) const;
343 MVTime getDate (const TableExprId& id) const;
344 String getString (const TableExprId& id) const;
345 Array<Bool> getArrayBool (const TableExprId& id) const;
346 Array<Int64> getArrayInt (const TableExprId& id) const;
347 Array<Double> getArrayDouble (const TableExprId& id) const;
349 Array<String> getArrayString (const TableExprId& id) const;
350 Array<MVTime> getArrayDate (const TableExprId& id) const;
351 // Get a value as an array, even it it is a scalar.
352 // This is useful in case one can give an argument as scalar or array.
353 // <group>
354 MArray<Bool> getBoolAS (const TableExprId& id) const;
355 MArray<Int64> getIntAS (const TableExprId& id) const;
356 MArray<Double> getDoubleAS (const TableExprId& id) const;
358 MArray<String> getStringAS (const TableExprId& id) const;
359 MArray<MVTime> getDateAS (const TableExprId& id) const;
360 // </group>
361
362 // </group>
363
364 // Get the data type for doing a getColumn on the expression.
365 // This is the data type of the column if the expression
366 // consists of a single column only.
367 // Otherwise it is the expression data type as returned by
368 // function <src>dataType</src>.
369 DataType getColumnDataType() const;
370
371 // Get the value of the expression evaluated for the entire column.
372 // The data of function called should match the data type as
373 // returned by function <src>getColumnDataType</src>.
374 // <group>
375 Array<Bool> getColumnBool (const RowNumbers& rownrs) const;
376 Array<uChar> getColumnuChar (const RowNumbers& rownrs) const;
377 Array<Short> getColumnShort (const RowNumbers& rownrs) const;
378 Array<uShort> getColumnuShort (const RowNumbers& rownrs) const;
379 Array<Int> getColumnInt (const RowNumbers& rownrs) const;
380 Array<uInt> getColumnuInt (const RowNumbers& rownrs) const;
381 Array<Int64> getColumnInt64 (const RowNumbers& rownrs) const;
382 Array<Float> getColumnFloat (const RowNumbers& rownrs) const;
383 Array<Double> getColumnDouble (const RowNumbers& rownrs) const;
384 Array<Complex> getColumnComplex (const RowNumbers& rownrs) const;
385 Array<DComplex> getColumnDComplex (const RowNumbers& rownrs) const;
386 Array<String> getColumnString (const RowNumbers& rownrs) const;
387 // </group>
388
389 // The same functions as above for the old Vector<uInt>.
390 // They are primarily meant for CASA's SplatalogueTable class.
391 // Normally they should not be used, hence declared private
392 // unless told otherwise.
393#ifndef IMPLICIT_CTDS_32BIT
394private:
395#endif
396 // <group>
398 { return getColumnBool (RowNumbers(rownrs)); }
400 { return getColumnuChar (RowNumbers(rownrs)); }
402 { return getColumnShort (RowNumbers(rownrs)); }
404 { return getColumnuShort (RowNumbers(rownrs)); }
406 { return getColumnInt (RowNumbers(rownrs)); }
408 { return getColumnuInt (RowNumbers(rownrs)); }
410 { return getColumnInt64 (RowNumbers(rownrs)); }
412 { return getColumnFloat (RowNumbers(rownrs)); }
414 { return getColumnDouble (RowNumbers(rownrs)); }
416 { return getColumnComplex (RowNumbers(rownrs)); }
418 { return getColumnDComplex (RowNumbers(rownrs)); }
420 { return getColumnString (RowNumbers(rownrs)); }
421 // </group>
422public:
423
424 // Show the tree.
425 void show (ostream&) const;
426
427 // Convert the tree to a number of range vectors which at least
428 // select the same things.
429 // This function is very useful to convert the expression to
430 // some intervals covering the select expression. This can
431 // be used to do a rough fast selection via an index and do the
432 // the slower final selection on that much smaller subset.
433 // The function can only convert direct comparisons of columns
434 // with constants (via ==, !=, >, >=, < or <=) and their combinations
435 // using && or ||.
437
438 // Check if tables used in expression have the same number of
439 // rows as the given table.
440 Bool checkTableSize (const Table& table, Bool canBeConst) const;
441
442 // Create a column node or constant keyword node.
443 static TableExprNode keyCol (const TableExprInfo& tabInfo,
444 const String& name,
445 const Vector<String>& fieldNames);
446
447 // Create a column node on behalf of the Table class.
448 // <src>fieldNames</src> indicate a possible field in a column of Records.
449 // For builtin data types another type of node is created than
450 // for other data types.
452 const String& colName,
453 const Vector<String>& fieldNames);
454
455 // Create a TableExprNodeConst for a table keyword
456 // (which is handled as a constant).
457 // <src>fieldNames</src> tells the name of the keyword and possible subrecords.
459 const Vector<String>& fieldNames);
460
461 // Handle all field names except the last one. ALl of them must
462 // be records. The last record is returned.
463 // fullName is filled with the full keyword name separated by dots.
464 static TableRecord* findLastKeyRec (const TableRecord& keyset,
465 const Vector<String>& fieldNames,
466 String& fullName);
467
468 // Throw invalid data type exception.
469 static void throwInvDT (const String& message);
470
471 // Create function node of the given type with the given arguments.
472 // <group>
474 const TableExprNodeSet& set,
475 const TableExprInfo& tabInfo,
476 const TaQLStyle& = TaQLStyle(0));
478 const TableExprNode& node);
480 const TableExprNode& node1,
481 const TableExprNode& node2);
483 const TableExprNode& node1,
484 const TableExprNode& node2,
485 const TableExprNode& node3);
487 const TableExprNode& array,
488 const TableExprNodeSet& axes);
490 const TableExprNode& array,
491 const TableExprNode& node,
492 const TableExprNodeSet& axes);
493 // </group>
494
495 // Create a user defined function node.
496 static TableExprNode newUDFNode (const String& name,
497 const TableExprNodeSet& set,
498 const TableExprInfo& tableInfo,
499 const TaQLStyle& = TaQLStyle(0));
500
501 // Create cone function node of the given type with the given arguments.
502 // <group>
504 const TableExprNodeSet& set,
505 uInt origin = 0);
507 const TableExprNode& node1,
508 const TableExprNode& node2);
510 const TableExprNode& node1,
511 const TableExprNode& node2,
512 const TableExprNode& node3);
513 // </group>
514
515 // Create rownumber() function node.
516 // Origin indicates whether the first row should be zero (for C++ binding)
517 // or an other value (one for TaQL binding).
519
520 // Create rowid() function node.
521 // Origin is always 0.
523
524 // Create rand() function node.
526
527 // Create ArrayElement node for the given array with the given index.
528 // The origin is 0 for C++ and 1 for TaQL.
530 const TableExprNodeSet& indices,
531 const TaQLStyle& = TaQLStyle(0));
532
533 // returns const pointer to the underlying TableExprNodeRep object.
534 const TENShPtr& getRep() const;
535 const TableExprNodeRep* getNodeRep() const;
536
537 // Adapt the unit of the expression to the given unit (if not empty).
538 void adaptUnit (const Unit&);
539
540 // Construct a new node for the given operation.
541 // <group>
542 TENShPtr newPlus (const TENShPtr& right) const;
543 TENShPtr newMinus (const TENShPtr& right) const;
544 TENShPtr newTimes (const TENShPtr& right) const;
545 TENShPtr newDivide (const TENShPtr& right) const;
546 TENShPtr newModulo (const TENShPtr& right) const;
547 TENShPtr newBitAnd (const TENShPtr& right) const;
548 TENShPtr newBitOr (const TENShPtr& right) const;
549 TENShPtr newBitXor (const TENShPtr& right) const;
550 TENShPtr newEQ (const TENShPtr& right) const;
551 TENShPtr newNE (const TENShPtr& right) const;
552 TENShPtr newGE (const TENShPtr& right) const;
553 TENShPtr newGT (const TENShPtr& right) const;
554 TENShPtr newIN (const TENShPtr& right, const TaQLStyle&) const;
555 TENShPtr newOR (const TENShPtr& right) const;
556 TENShPtr newAND (const TENShPtr& right) const;
557 // </group>
558
559private:
560 // Put the new binary node object in a shared pointer.
561 // Set the node's info and adapt the children if needed.
562 // If the node is constant, it is evaluated and returned as result.
564 const TENShPtr& right=TENShPtr()) const;
565
566 // convert Block of TableExprNode to vector of TENShPtr.
567 static std::vector<TENShPtr> convertBlockTEN (Block<TableExprNode>& nodes);
568
569 // The actual (counted referenced) representation of a node.
571};
572
573
574
576 { node_p->ranges (blrange); }
577
578//# Get the value of an expression.
579inline void TableExprNode::get (const TableExprId& id, Bool& value) const
580 { value = node_p->getBool (id); }
581inline void TableExprNode::get (const TableExprId& id, Int64& value) const
582 { value = node_p->getInt (id); }
583inline void TableExprNode::get (const TableExprId& id, Double& value) const
584 { value = node_p->getDouble (id); }
585inline void TableExprNode::get (const TableExprId& id, DComplex& value) const
586 { value = node_p->getDComplex (id); }
587inline void TableExprNode::get (const TableExprId& id, String& value) const
588 { value = node_p->getString (id); }
589inline void TableExprNode::get (const TableExprId& id, TaqlRegex& value) const
590 { value = node_p->getRegex (id); }
591inline void TableExprNode::get (const TableExprId& id, MVTime& value) const
592 { value = node_p->getDate (id); }
593inline void TableExprNode::get (const TableExprId& id,
594 MArray<Bool>& value) const
595 { value = node_p->getArrayBool (id); }
596inline void TableExprNode::get (const TableExprId& id,
597 MArray<Int64>& value) const
598 { value = node_p->getArrayInt (id); }
599inline void TableExprNode::get (const TableExprId& id,
600 MArray<Double>& value) const
601 { value = node_p->getArrayDouble (id); }
602inline void TableExprNode::get (const TableExprId& id,
603 MArray<DComplex>& value) const
604 { value = node_p->getArrayDComplex (id); }
605inline void TableExprNode::get (const TableExprId& id,
606 MArray<String>& value) const
607 { value = node_p->getArrayString (id); }
608inline void TableExprNode::get (const TableExprId& id,
609 MArray<MVTime>& value) const
610 { value = node_p->getArrayDate (id); }
611inline void TableExprNode::get (const TableExprId& id,
612 Array<Bool>& value) const
613 { value = node_p->getArrayBool (id).array(); }
614inline void TableExprNode::get (const TableExprId& id,
615 Array<Int64>& value) const
616 { value = node_p->getArrayInt (id).array(); }
617inline void TableExprNode::get (const TableExprId& id,
618 Array<Double>& value) const
619 { value = node_p->getArrayDouble (id).array(); }
620inline void TableExprNode::get (const TableExprId& id,
621 Array<DComplex>& value) const
622 { value = node_p->getArrayDComplex (id).array(); }
623inline void TableExprNode::get (const TableExprId& id,
624 Array<String>& value) const
625 { value = node_p->getArrayString (id).array(); }
626inline void TableExprNode::get (const TableExprId& id,
627 Array<MVTime>& value) const
628 { value = node_p->getArrayDate (id).array(); }
630 { return node_p->getBool (id); }
632 { return node_p->getInt (id); }
634 { return node_p->getDouble (id); }
635inline DComplex TableExprNode::getDComplex (const TableExprId& id) const
636 { return node_p->getDComplex (id); }
638 { return node_p->getDate (id); }
640 { return node_p->getString (id); }
642 { return node_p->getArrayBool (id).array(); }
644 { return node_p->getArrayInt (id).array(); }
646 { return node_p->getArrayDouble (id).array(); }
648 { return node_p->getArrayDComplex (id).array(); }
650 { return node_p->getArrayString (id).array(); }
652 { return node_p->getArrayDate (id).array(); }
654 { return node_p->getBoolAS (id); }
656 { return node_p->getIntAS (id); }
658 { return node_p->getDoubleAS (id); }
660 { return node_p->getDComplexAS (id); }
662 { return node_p->getStringAS (id); }
664 { return node_p->getDateAS (id); }
665
667 { return node_p->getColumnBool (rownrs); }
669 { return node_p->getColumnuChar (rownrs); }
671 { return node_p->getColumnShort (rownrs); }
673 { return node_p->getColumnuShort (rownrs); }
675 { return node_p->getColumnInt (rownrs); }
677 { return node_p->getColumnuInt (rownrs); }
679 { return node_p->getColumnInt64 (rownrs); }
681 { return node_p->getColumnFloat (rownrs); }
683 { return node_p->getColumnDouble (rownrs); }
685 { return node_p->getColumnComplex (rownrs); }
687 { return node_p->getColumnDComplex (rownrs); }
689 { return node_p->getColumnString (rownrs); }
690
691inline void TableExprNode::show (ostream& os) const
692 { node_p->show (os, 0); }
693inline const TENShPtr& TableExprNode::getRep() const
694 { return node_p; }
696 { return node_p.get(); }
697
698
699
700// Define all global functions operating on a TableExprNode.
701// <group name=GlobalTableExprNode>
702
703 //# Define the operations we allow.
704 //# Note that the arguments are defined as const. This is necessary
705 //# because the compiler generates temporaries when converting a constant
706 //# to a TableExprNode using the constructors. Temporaries has to be const.
707 //# However, we have to delete created nodes, so lnode_p and rnode_p
708 //# cannot be const. The const arguments are casted to a non-const in
709 //# the function fill which calls the non-const function simplify.
710
711 // Arithmetic operators for numeric TableExprNode's.
712 // <group>
713 // + is also defined for strings (means concatenation).
715 const TableExprNode& right);
717 const TableExprNode& right);
719 const TableExprNode& right);
721 const TableExprNode& right);
723 const TableExprNode& right);
725 const TableExprNode& right);
727 const TableExprNode& right);
729 const TableExprNode& right);
730 // </group>
731
732 // Comparison operators.
733 // <group>
735 const TableExprNode& right);
737 const TableExprNode& right);
738 // Not defined for Bool.
739 // <group>
740 TableExprNode operator>= (const TableExprNode& left,
741 const TableExprNode& right);
742 TableExprNode operator> (const TableExprNode& left,
743 const TableExprNode& right);
744 TableExprNode operator<= (const TableExprNode& left,
745 const TableExprNode& right);
746 TableExprNode operator< (const TableExprNode& left,
747 const TableExprNode& right);
748 // </group>
749 // </group>
750
751 // Logical operators to combine boolean TableExprNode's.
752 // A null TableExprNode object is ignored, so it is possible to
753 // build up a full expression gradually.
754 // <group>
756 const TableExprNode& right);
758 const TableExprNode& right);
759 // </group>
760
761 // Functions to return whether a value is "relatively" near another.
762 // Returns <src> tol > abs(val2 - val1)/max(abs(val1),(val2))</src>.
763 // If tol <= 0, returns val1 == val2. If either val is 0.0, takes
764 // care of area around the minimum number that can be represented.
765 // <br>The nearAbs functions return whether a value is "absolutely" near
766 // another. Returns <src> tol > abs(val2 - val1)</src>.
767 // Default tolerance is 1.0e-13.
768 // They operate on scalars and arrays.
769 // <group>
770 TableExprNode near (const TableExprNode& left,
771 const TableExprNode& right);
772 TableExprNode near (const TableExprNode& left,
773 const TableExprNode& right,
774 const TableExprNode& tolerance);
776 const TableExprNode& right);
778 const TableExprNode& right,
779 const TableExprNode& tolerance);
780 // </group>
781
782 // Angular distance between positions.
783 // Both arguments have to be arrays. If both arrays contain 2 values
784 // (ra and dec), the result is a scalar.
785 // Otherwise the arrays have to contain a multiple of 2 values and the
786 // result is a 2-dim array giving the distance of each position in the
787 // first array to each position in the second array.
789 const TableExprNode& pos2);
790
791 // Angular distance as above, but only pair-wise enties are used if
792 // both arguments are arrays.
794 const TableExprNode& pos2);
795
796 // Cone search; test if the position of a source is inside a cone.
797 // <br>Argument <src>sourcePos</src> must be a double array
798 // containing two values (ra and dec of source) in radians.
799 // <br>Argument <src>cones</src> must be a double array
800 // specifying the position of the cone centers and radii in radians.
801 // So the array must contain three values (ra,dec,radius)
802 // or a multiple of it.
803 // <group>
804 // The result is a bool array telling for each cone if it contains the
805 // source. If there is only one cone, the result is a scalar.
806 TableExprNode cones (const TableExprNode& sourcePos,
807 const TableExprNode& cones);
808 // The result is always a Bool scalar telling if any cone contains
809 // the source.
810 TableExprNode anyCone (const TableExprNode& sourcePos,
811 const TableExprNode& cones);
812 // The sourcePos can contain multiple sources.
813 // The result is a double array giving the index of the first
814 // cone containing the corresponding source.
815 // If there is one source, the result is a double scalar.
816 TableExprNode findCone (const TableExprNode& sourcePos,
817 const TableExprNode& cones);
818 // </group>
819
820 // Cone search as above.
821 // However, the cone positions and radii are specified separately
822 // and (virtually) a larger array containing every combination of
823 // position/radius is formed.
824 // <group>
825 TableExprNode cones (const TableExprNode& sourcePos,
826 const TableExprNode& conePos,
827 const TableExprNode& radii);
828 TableExprNode anyCone (const TableExprNode& sourcePos,
829 const TableExprNode& conePos,
830 const TableExprNode& radii);
831 TableExprNode findCone (const TableExprNode& sourcePos,
832 const TableExprNode& conePos,
833 const TableExprNode& radii);
834 // </group>
835
836 // Transcendental functions that can be applied to essentially all numeric
837 // nodes containing scalars or arrays.
838 // <group>
839 TableExprNode sin (const TableExprNode& node);
840 TableExprNode sinh (const TableExprNode& node);
841 TableExprNode cos (const TableExprNode& node);
842 TableExprNode cosh (const TableExprNode& node);
843 TableExprNode exp (const TableExprNode& node);
844 TableExprNode log (const TableExprNode& node);
845 TableExprNode log10 (const TableExprNode& node);
846 TableExprNode pow (const TableExprNode& x, const TableExprNode& exp);
847 TableExprNode square (const TableExprNode& node);
848 TableExprNode cube (const TableExprNode& node);
849 TableExprNode sqrt (const TableExprNode& node);
850 TableExprNode norm (const TableExprNode& node);
851 // </group>
852
853 // Transcendental functions applied to to nodes containing scalars or
854 // arrays with double values.
855 // They are invalid for Complex nodes.
856 // <group>
857 TableExprNode asin (const TableExprNode& node);
858 TableExprNode acos (const TableExprNode& node);
859 TableExprNode atan (const TableExprNode& node);
861 const TableExprNode& x);
862 TableExprNode tan (const TableExprNode& node);
863 TableExprNode tanh (const TableExprNode& node);
864 TableExprNode sign (const TableExprNode& node);
865 TableExprNode round (const TableExprNode& node);
866 TableExprNode ceil (const TableExprNode& node);
867 TableExprNode abs (const TableExprNode& node);
868 TableExprNode floor (const TableExprNode& node);
870 const TableExprNode& y);
871 // </group>
872
873 // String functions on scalars or arrays.
874 // <group>
876 TableExprNode upcase (const TableExprNode& node);
879 TableExprNode trim (const TableExprNode& node);
880 TableExprNode ltrim (const TableExprNode& node);
881 TableExprNode rtrim (const TableExprNode& node);
883 const TableExprNode& pos);
885 const TableExprNode& pos,
886 const TableExprNode& npos);
888 const TableExprNode& patt);
890 const TableExprNode& patt,
891 const TableExprNode& repl);
892 // </group>
893
894 // Functions for regular expression matching and
895 // pattern matching. Defined for scalars and arrays.
896 // <br><src>pattern</src> is for a file name like pattern.
897 // <br><src>sqlpattern</src> is for an SQL like pattern.
898 // <group>
899 TableExprNode regex (const TableExprNode& node);
900 TableExprNode pattern (const TableExprNode& node);
902 // </group>
903
904 // Functions for date-values. Defined for scalars and arrays.
905 //# Note, ctod is called ctodt, because Mac OS-X defines a macro
906 //# ctod in param.h
907 // <group>
910 TableExprNode mjd (const TableExprNode& node);
911 TableExprNode date (const TableExprNode& node);
912 TableExprNode year (const TableExprNode& node);
913 TableExprNode month (const TableExprNode& node);
914 TableExprNode day (const TableExprNode& node);
915 TableExprNode cmonth (const TableExprNode& node);
916 TableExprNode weekday (const TableExprNode& node);
917 TableExprNode cdow (const TableExprNode& node);
918 TableExprNode ctodt (const TableExprNode& node);
919 TableExprNode cdate (const TableExprNode& node);
920 TableExprNode ctime (const TableExprNode& node);
921 TableExprNode week (const TableExprNode& node);
922 TableExprNode time (const TableExprNode& node);
923 // </group>
924
925 // Functions for angle-values. Defined for scalars and arrays.
926 // dhms converts pairs of values to hms and dms and only works for arrays.
927 // <group>
928 TableExprNode hms (const TableExprNode& node);
929 TableExprNode dms (const TableExprNode& node);
930 TableExprNode hdms (const TableExprNode& node);
931 // </group>
932
933 // Function to convert any value to a string.
934 // See TaQL note 199 for possible format values.
935 // <group>
938 const TableExprNode& format);
939 // </group>
940
941 // Function to test if a scalar or array is NaN (not-a-number).
942 // It results in a Bool scalar or array.
943 TableExprNode isNaN (const TableExprNode& node);
944
945 // Function to test if a scalar or array is finite.
946 // It results in a Bool scalar or array.
948
949 // Minimum or maximum of 2 nodes.
950 // Makes sense for numeric and String values. For Complex values
951 // the norm is compared.
952 // One or both arguments can be scalar or array.
953 // <group>
954 TableExprNode min (const TableExprNode& a, const TableExprNode& b);
955 TableExprNode max (const TableExprNode& a, const TableExprNode& b);
956 // </group>
957
958 // The complex conjugate of a complex node.
959 // Defined for scalars and arrays.
960 TableExprNode conj (const TableExprNode& node);
961
962 // The real part of a complex node.
963 // Defined for scalars and arrays.
964 TableExprNode real (const TableExprNode& node);
965
966 // The imaginary part of a complex node.
967 // Defined for scalars and arrays.
968 TableExprNode imag (const TableExprNode& node);
969
970 // Convert double, bool, or string to int (using floor).
971 TableExprNode integer (const TableExprNode& node);
972
973 // Convert numeric or string value to bool (0, no, false, - means false)
974 TableExprNode boolean (const TableExprNode& node);
975
976 // The amplitude (i.e. sqrt(re*re + im*im)) of a complex node.
977 // This is a synonym for function abs.
978 // Defined for scalars and arrays.
980
981 // The phase (i.e. atan2(im, re)) of a complex node.
982 // This is a synonym for function arg.
983 // Defined for scalars and arrays.
984 TableExprNode phase (const TableExprNode& node);
985
986 // The arg (i.e. atan2(im, re)) of a complex node.
987 // Defined for scalars and arrays.
988 TableExprNode arg (const TableExprNode& node);
989
990 // Form a complex number from two Doubles.
991 // One or both arguments can be scalar or array.
993 const TableExprNode& imag);
994 // Form a complex number from a string.
995 // Defined for scalars and arrays.
997
998 // Functions operating on a Double or Complex scalar or array resulting in
999 // a scalar with the same data type.
1000 // <group>
1004 // </group>
1005
1006 // Functions operating on a Double scalar or array resulting in
1007 // a Double scalar.
1008 // <group>
1018 const TableExprNode& fraction);
1019 // </group>
1020
1021 // <group>
1026 // </group>
1027
1028 // The partial version of the functions above.
1029 // They are applied to the array subsets defined by the axes in the set
1030 // using the partialXXX functions in ArrayMath.
1031 // The axes must be 0-relative.
1032 // <group>
1034 const TableExprNodeSet& collapseAxes);
1036 const TableExprNodeSet& collapseAxes);
1038 const TableExprNodeSet& collapseAxes);
1040 const TableExprNodeSet& collapseAxes);
1042 const TableExprNodeSet& collapseAxes);
1044 const TableExprNodeSet& collapseAxes);
1046 const TableExprNodeSet& collapseAxes);
1048 const TableExprNodeSet& collapseAxes);
1050 const TableExprNodeSet& collapseAxes);
1052 const TableExprNodeSet& collapseAxes);
1054 const TableExprNodeSet& collapseAxes);
1056 const TableExprNode& fraction,
1057 const TableExprNodeSet& collapseAxes);
1059 const TableExprNodeSet& collapseAxes);
1061 const TableExprNodeSet& collapseAxes);
1063 const TableExprNodeSet& collapseAxes);
1065 const TableExprNodeSet& collapseAxes);
1066 // </group>
1067
1068 // Functions operating for each element on a box around that element.
1069 // The elements at the edges (where no full box can be made) are set to 0.
1070 // <group>
1072 const TableExprNodeSet& halfBoxWidth);
1074 const TableExprNodeSet& halfBoxWidth);
1076 const TableExprNodeSet& halfBoxWidth);
1078 const TableExprNodeSet& halfBoxWidth);
1080 const TableExprNodeSet& halfBoxWidth);
1082 const TableExprNodeSet& halfBoxWidth);
1084 const TableExprNodeSet& halfBoxWidth);
1086 const TableExprNodeSet& halfBoxWidth);
1088 const TableExprNodeSet& halfBoxWidth);
1090 const TableExprNodeSet& halfBoxWidth);
1091 // </group>
1092
1093 // Create an array of the given shape and fill it with the values.
1094 // The <src>values</src> array is rewound as needed.
1095 TableExprNode array (const TableExprNode& values,
1096 const TableExprNodeSet& shape);
1097
1098 // Form a masked array.
1100 const TableExprNode& mask);
1101
1102 // Get the data array of a masked array.
1104
1105 // Flatten a masked array (get unmasked elements).
1107
1108 // Get the mask of a masked array.
1109 // If the array has no mask, it return an array with all False values.
1111
1112 // Get the diagonal of a (masked) array;
1113 // If the array is not a Matrix, it will take the diagonals of the
1114 // subarrays given by the two axes in the axes argument. Those
1115 // axes have to have the same length (thus each subarray is a Matrix).
1116 // If no axes are given, they default to the first two axes.
1117 // <br>The <src>diag</src> argument tells which diagonal to take.
1118 // 0 is the main diagonal, >0 is above main diagonal, <0 is below.
1121 const TableExprNode& firstAxis);
1123 const TableExprNode& firstAxis,
1124 const TableExprNode& diag);
1125
1126 // Transpose all axes of a (masked) array.
1128 // Transpose a (masked) array by making the given axes the first axes.
1130 const TableExprNode& axes);
1131
1132 // Function operating on a field resulting in a bool scalar.
1133 // It can be used to test if a column has an array in the current row.
1134 // It can also be used to test if a record contains a field.
1136
1137 // Functions operating on any scalar or array resulting in a Double scalar.
1138 // A scalar has 1 element and dimensionality 0.
1139 // <group>
1142 // </group>
1143
1144 // Function operating on any scalar or array resulting in a Double array
1145 // containing the shape. A scalar has shape [1].
1147
1148 // Function resembling the ternary <src>?:</src> construct in C++.
1149 // The argument "condition" has to be a Bool value.
1150 // If an element in "condition" is True, the corresponding element from
1151 // "arg1" is taken, otherwise it is taken from "arg2".
1152 // The arguments can be scalars or array or any combination.
1153 TableExprNode iif (const TableExprNode& condition,
1154 const TableExprNode& arg1,
1155 const TableExprNode& arg2);
1156// </group>
1157
1158
1159
1161 const TableExprNode& right)
1162{
1163 return left.newPlus (right.getRep());
1164}
1166 const TableExprNode& right)
1167{
1168 return left.newMinus (right.getRep());
1169}
1171 const TableExprNode& right)
1172{
1173 return left.newTimes (right.getRep());
1174}
1176 const TableExprNode& right)
1177{
1178 return left.newDivide (right.getRep());
1179}
1181 const TableExprNode& right)
1182{
1183 return left.newModulo (right.getRep());
1184}
1186 const TableExprNode& right)
1187{
1188 return left.newBitAnd (right.getRep());
1189}
1191 const TableExprNode& right)
1192{
1193 return left.newBitOr (right.getRep());
1194}
1196 const TableExprNode& right)
1197{
1198 return left.newBitXor (right.getRep());
1199}
1201 const TableExprNode& right)
1202{
1203 return left.newEQ (right.getRep());
1204}
1206 const TableExprNode& right)
1207{
1208 return left.newNE (right.getRep());
1209}
1210inline TableExprNode operator> (const TableExprNode& left,
1211 const TableExprNode& right)
1212{
1213 return left.newGT (right.getRep());
1214}
1215inline TableExprNode operator>= (const TableExprNode& left,
1216 const TableExprNode& right)
1217{
1218 return left.newGE (right.getRep());
1219}
1220inline TableExprNode operator<= (const TableExprNode& left,
1221 const TableExprNode& right)
1222{
1223 return right.newGE (left.getRep());
1224}
1225inline TableExprNode operator< (const TableExprNode& left,
1226 const TableExprNode& right)
1227{
1228 return right.newGT (left.getRep());
1229}
1231 const TaQLStyle& style) const
1232{
1233 return newIN (right.getRep(), style);
1234}
1236{
1237 // C++ indexing is 0-based.
1238 return newArrayPartNode (*this, indices, TaQLStyle(0));
1239}
1240
1242 const TableExprNode& right)
1243{
1245 left, right);
1246}
1248 const TableExprNode& right,
1249 const TableExprNode& tolerance)
1250{
1252 left, right, tolerance);
1253}
1255 const TableExprNode& right)
1256{
1258 left, right);
1259}
1261 const TableExprNode& right,
1262 const TableExprNode& tolerance)
1263{
1265 left, right, tolerance);
1266}
1268 const TableExprNode& pos2)
1269{
1271 pos1, pos2);
1272}
1274 const TableExprNode& pos2)
1275{
1277 pos1, pos2);
1278}
1279inline TableExprNode cones (const TableExprNode& sourcePos,
1280 const TableExprNode& cones)
1281{
1283 sourcePos, cones);
1284}
1285inline TableExprNode anyCone (const TableExprNode& sourcePos,
1286 const TableExprNode& cones)
1287{
1289 sourcePos, cones);
1290}
1291inline TableExprNode findCone (const TableExprNode& sourcePos,
1292 const TableExprNode& cones)
1293{
1295 sourcePos, cones);
1296}
1297inline TableExprNode cones (const TableExprNode& sourcePos,
1298 const TableExprNode& conePos,
1299 const TableExprNode& radii)
1300{
1302 sourcePos, conePos, radii);
1303}
1304inline TableExprNode anyCone (const TableExprNode& sourcePos,
1305 const TableExprNode& conePos,
1306 const TableExprNode& radii)
1307{
1309 sourcePos, conePos, radii);
1310}
1311inline TableExprNode findCone (const TableExprNode& sourcePos,
1312 const TableExprNode& conePos,
1313 const TableExprNode& radii)
1314{
1316 sourcePos, conePos, radii);
1317}
1351{
1353 node);
1354}
1356{
1358 node);
1359}
1473{
1475 node);
1476}
1532{
1534 node);
1535}
1575 const TableExprNode& format)
1576{
1578 node, format);
1579}
1601 const TableExprNode& pos)
1602{
1604 node, pos);
1605}
1607 const TableExprNode& pos,
1608 const TableExprNode& npos)
1609{
1611 node, pos, npos);
1612}
1614 const TableExprNode& patt)
1615{
1617 node, patt);
1618}
1620 const TableExprNode& patt,
1621 const TableExprNode& repl)
1622{
1624 node, patt, repl);
1625}
1639inline TableExprNode min (const TableExprNode& node)
1640{
1642 node);
1643}
1644inline TableExprNode max (const TableExprNode& node)
1645{
1647 node);
1648}
1649inline TableExprNode sum (const TableExprNode& node)
1650{
1652 node);
1653}
1665{
1667 node);
1668}
1684inline TableExprNode rms (const TableExprNode& node)
1685{
1687 node);
1688}
1695 const TableExprNode& fraction)
1696{
1698 node, fraction);
1699}
1717 const TableExprNodeSet& axes)
1718{
1720 array, axes);
1721}
1735 const TableExprNodeSet& axes)
1736{
1738 array, axes);
1739}
1741 const TableExprNodeSet& axes)
1742{
1744 array, axes);
1745}
1771 const TableExprNodeSet& axes)
1772{
1774 array, axes);
1775}
1783 const TableExprNode& fraction,
1784 const TableExprNodeSet& axes)
1785{
1787 array, fraction, axes);
1788}
1790 const TableExprNodeSet& axes)
1791{
1793 array, axes);
1794}
1796 const TableExprNodeSet& axes)
1797{
1799 array, axes);
1800}
1814 const TableExprNodeSet& halfBoxWidth)
1815{
1817 node, halfBoxWidth);
1818}
1820 const TableExprNodeSet& halfBoxWidth)
1821{
1823 node, halfBoxWidth);
1824}
1826 const TableExprNodeSet& halfBoxWidth)
1827{
1829 node, halfBoxWidth);
1830}
1832 const TableExprNodeSet& halfBoxWidth)
1833{
1835 node, halfBoxWidth);
1836}
1838 const TableExprNodeSet& halfBoxWidth)
1839{
1841 node, halfBoxWidth);
1842}
1844 const TableExprNodeSet& halfBoxWidth)
1845{
1847 node, halfBoxWidth);
1848}
1850 const TableExprNodeSet& halfBoxWidth)
1851{
1853 node, halfBoxWidth);
1854}
1856 const TableExprNodeSet& halfBoxWidth)
1857{
1859 node, halfBoxWidth);
1860}
1862 const TableExprNodeSet& halfBoxWidth)
1863{
1865 node, halfBoxWidth);
1866}
1868 const TableExprNodeSet& halfBoxWidth)
1869{
1871 node, halfBoxWidth);
1872}
1874 const TableExprNodeSet& halfBoxWidth)
1875{
1877 node, halfBoxWidth);
1878}
1880 const TableExprNodeSet& halfBoxWidth)
1881{
1883 node, halfBoxWidth);
1884}
1886 const TableExprNodeSet& halfBoxWidth)
1887{
1889 node, halfBoxWidth);
1890}
1892 const TableExprNodeSet& halfBoxWidth)
1893{
1895 node, halfBoxWidth);
1896}
1898 const TableExprNodeSet& halfBoxWidth)
1899{
1901 node, halfBoxWidth);
1902}
1904 const TableExprNodeSet& halfBoxWidth)
1905{
1907 node, halfBoxWidth);
1908}
1910 const TableExprNodeSet& halfBoxWidth)
1911{
1913 node, halfBoxWidth);
1914}
1916 const TableExprNodeSet& halfBoxWidth)
1917{
1919 node, halfBoxWidth);
1920}
1922 const TableExprNodeSet& halfBoxWidth)
1923{
1925 node, halfBoxWidth);
1926}
1928 const TableExprNodeSet& halfBoxWidth)
1929{
1931 node, halfBoxWidth);
1932}
1933inline TableExprNode array (const TableExprNode& values,
1934 const TableExprNodeSet& shape)
1935{
1937 values, shape);
1938}
1961{
1962 // Needs an empty axes argument.
1964 array,
1966}
1995inline TableExprNode iif (const TableExprNode& condition,
1996 const TableExprNode& arg1,
1997 const TableExprNode& arg2)
1998{
2000 condition, arg1, arg2);
2001}
2002
2003
2004
2005} //# NAMESPACE CASACORE - END
2006
2007#endif
simple 1-D array
Definition Block.h:198
Double getDouble() const
DComplex getDComplex() const
Array< DComplex > getArrayDComplex() const
Array< Double > getArrayDouble() const
Array< Bool > getArrayBool() const
String: the storage and methods of handling collections of characters.
Definition String.h:223
@ sinFUNC
for Int, Double or DComplex returning Double or Complex
@ complexFUNC
for DComplex or String returning DComplex
@ isdefFUNC
for any array returning Bool scalar
@ stringFUNC
return values as strings
@ boolFUNC
for Int, Double, Complex or String returning Bool
@ angdistFUNC
angular distance returning radians
@ iifFUNC
special function resembling if statement
@ realFUNC
for Int, Double, DComplex, Bool or String returning Double
@ hmsFUNC
return angles as hms strings
@ arrsumFUNC
for Int, Double or Complex array returning the same
@ asinFUNC
for Int, Double or Complex returning Double or Complex
@ arranyFUNC
for Bool array returning Bool
@ arrmeanFUNC
for Int or Double array returning Double
@ arrayFUNC
for any type returning array of that type
@ shapeFUNC
for any array returning Int array
@ near2FUNC
for Int, or Double or Complex returning Bool (2 is with default tolerance)
@ conesFUNC
cone search functions, implemented in derived class
@ isnanFUNC
for Int, Double or DComplex array returning Bool
@ intFUNC
for Int, Double, Bool or String returning Int (using floor)
@ argFUNC
for Int, Double or DComplex returning Double
@ arrminFUNC
for Int or Double array returning Int or Double
@ hdmsFUNC
return angles as hms/dms strings
@ arrntrueFUNC
for Bool array returning Int scalar
@ imagFUNC
for Double or DComplex returning Double
@ ndimFUNC
for any array returning Int scalar
@ normFUNC
for Int, Double or DComplex returning Int or Double
@ dmsFUNC
return angles as dms strings
@ signFUNC
for Int or Double returning Int or Double
@ squareFUNC
for Int, Double or DComplex returning Int, Double or Complex
Class to connect a Table and its alias name.
const Table & table() const
Get the Table object.
Abstract base class for a node having 0, 1, or 2 child nodes.
Abstract base class for a node in a table column expression tree.
void get(const TableExprId &id, Bool &value)
General get functions for template purposes.
Array< DComplex > getColumnDComplex(const RowNumbers &rownrs) const
Definition ExprNode.h:686
Array< Short > getColumnShort(const Vector< uInt > &rownrs) const
Definition ExprNode.h:401
TableExprNode(const MArray< Int > &value)
TableExprNode(const Array< String > &value)
TENShPtr newModulo(const TENShPtr &right) const
Int64 getInt(const TableExprId &id) const
Definition ExprNode.h:631
TENShPtr node_p
The actual (counted referenced) representation of a node.
Definition ExprNode.h:570
TableExprNode(const Float &value)
static TableExprNode newConeNode(TableExprFuncNode::FunctionType, const TableExprNode &node1, const TableExprNode &node2, const TableExprNode &node3)
TableExprNode(const MArray< Short > &value)
Array< DComplex > getArrayDComplex(const TableExprId &id) const
Definition ExprNode.h:647
Double getDouble(const TableExprId &id) const
Definition ExprNode.h:633
static TableRecord * findLastKeyRec(const TableRecord &keyset, const Vector< String > &fieldNames, String &fullName)
Handle all field names except the last one.
rownr_t nrow() const
Get the number of rows in the table associated with this expression.
Definition ExprNode.h:312
~TableExprNode()
The destructor deletes all the underlying TableExprNode objects,.
TableExprNode(const TableExprNode &)
copy constructor (reference semantics).
Array< DComplex > getColumnDComplex(const Vector< uInt > &rownrs) const
Definition ExprNode.h:417
static TableExprNode keyCol(const TableExprInfo &tabInfo, const String &name, const Vector< String > &fieldNames)
Create a column node or constant keyword node.
TableExprNode(const Int64 &value)
TENShPtr newGE(const TENShPtr &right) const
const Record & attributes() const
Get the attributes of the expression.
Definition ExprNode.h:296
MArray< MVTime > getDateAS(const TableExprId &id) const
Definition ExprNode.h:663
static TableExprNode newConeNode(TableExprFuncNode::FunctionType, const TableExprNodeSet &set, uInt origin=0)
Create cone function node of the given type with the given arguments.
TableExprNode(const Complex &value)
MArray< String > getStringAS(const TableExprId &id) const
Definition ExprNode.h:661
static TableExprNode newFunctionNode(TableExprFuncNode::FunctionType, const TableExprNode &array, const TableExprNode &node, const TableExprNodeSet &axes)
TableExprInfo getTableInfo() const
Get the table info of the expression node.
Definition ExprNode.h:282
TableExprNode(const MArray< Bool > &value)
TableExprNode(const Array< Bool > &value)
Array< uShort > getColumnuShort(const RowNumbers &rownrs) const
Definition ExprNode.h:672
Array< String > getColumnString(const Vector< uInt > &rownrs) const
Definition ExprNode.h:419
MArray< Bool > getBoolAS(const TableExprId &id) const
Get a value as an array, even it it is a scalar.
Definition ExprNode.h:653
TableExprNode(const Array< Int > &value)
TableExprNode(const std::string &value)
TableExprNode(const MArray< MVTime > &value)
TENShPtr newOR(const TENShPtr &right) const
Array< Double > getColumnDouble(const Vector< uInt > &rownrs) const
Definition ExprNode.h:413
TableExprNode operator!() const
Unary NOT-operator on boolean TableExprNode's.
MArray< Int64 > getIntAS(const TableExprId &id) const
Definition ExprNode.h:655
TableExprNode operator-() const
TableExprNode(const Array< uShort > &value)
Array< Bool > getColumnBool(const Vector< uInt > &rownrs) const
The same functions as above for the old Vector<uInt>.
Definition ExprNode.h:397
Array< Int64 > getColumnInt64(const RowNumbers &rownrs) const
Definition ExprNode.h:678
TENShPtr newBitXor(const TENShPtr &right) const
Array< uChar > getColumnuChar(const RowNumbers &rownrs) const
Definition ExprNode.h:668
TableExprNode(const DComplex &value)
Array< Complex > getColumnComplex(const RowNumbers &rownrs) const
Definition ExprNode.h:684
static TableExprNode newFunctionNode(TableExprFuncNode::FunctionType, const TableExprNode &node1, const TableExprNode &node2, const TableExprNode &node3)
TENShPtr newDivide(const TENShPtr &right) const
TableExprNode(const MArray< uInt > &value)
TENShPtr newEQ(const TENShPtr &right) const
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.
Definition ExprNode.h:1230
Bool isScalar() const
Is the expression a scalar?
Definition ExprNode.h:306
TENShPtr newTimes(const TENShPtr &right) const
TableExprNode(const Array< uInt64 > &value)
void get(const TableExprId &id, Bool &value) const
Get a value for this node in the given row.
Definition ExprNode.h:579
static TableExprNode newFunctionNode(TableExprFuncNode::FunctionType, const TableExprNodeSet &set, const TableExprInfo &tabInfo, const TaQLStyle &=TaQLStyle(0))
Create function node of the given type with the given arguments.
TableExprNode & operator=(const TableExprNode &)
Assignment (reference semantics).
Array< Double > getColumnDouble(const RowNumbers &rownrs) const
Definition ExprNode.h:682
TableExprNode(const Array< Complex > &value)
Table table() const __attribute__((deprecated("Use getTableInfo().table() instead")))
Get the table to which the expression node belongs.
Definition ExprNode.h:287
void ranges(Block< TableExprRange > &)
Convert the tree to a number of range vectors which at least select the same things.
Definition ExprNode.h:575
static TableExprNode newFunctionNode(TableExprFuncNode::FunctionType, const TableExprNode &node1, const TableExprNode &node2)
static TableExprNode newFunctionNode(TableExprFuncNode::FunctionType, const TableExprNode &node)
Bool isNull() const
Does the node contain no actual node?
Definition ExprNode.h:269
Array< Float > getColumnFloat(const RowNumbers &rownrs) const
Definition ExprNode.h:680
static TableExprNode newConeNode(TableExprFuncNode::FunctionType, const TableExprNode &node1, const TableExprNode &node2)
TableExprNode(const MArray< Float > &value)
Array< Float > getColumnFloat(const Vector< uInt > &rownrs) const
Definition ExprNode.h:411
TENShPtr newBitOr(const TENShPtr &right) const
MArray< DComplex > getDComplexAS(const TableExprId &id) const
Definition ExprNode.h:659
TableExprNode(const String &value)
TableExprNode(const Int &value)
TENShPtr newIN(const TENShPtr &right, const TaQLStyle &) const
TableExprNode(const Array< Float > &value)
TableExprNode operator+() const
Unary operators on numeric TableExprNode's.
Array< Short > getColumnShort(const RowNumbers &rownrs) const
Definition ExprNode.h:670
Array< MVTime > getArrayDate(const TableExprId &id) const
Definition ExprNode.h:651
TENShPtr newBitAnd(const TENShPtr &right) const
TableExprNode(const MArray< Complex > &value)
TableExprNode(const Array< uInt > &value)
TableExprNode(const MArray< uInt64 > &value)
const Unit & unit() const
Get the unit of the expression.
Definition ExprNode.h:292
static TableExprNode newFunctionNode(TableExprFuncNode::FunctionType, const TableExprNode &array, const TableExprNodeSet &axes)
static void throwInvDT(const String &message)
Throw invalid data type exception.
Array< Int > getColumnInt(const Vector< uInt > &rownrs) const
Definition ExprNode.h:405
TableExprNode(const MArray< DComplex > &value)
TableExprNode(const Array< uChar > &value)
TableExprNode useUnit(const Unit &unit) const
Use a unit for the given TableExprNode.
TableExprNode(const Regex &value)
TableExprNode operator()(const TableExprNodeSet &indices)
Slicing in a node containing an array.
Definition ExprNode.h:1235
TableExprNode(const Array< MVTime > &value)
TENShPtr newMinus(const TENShPtr &right) const
Bool checkTableSize(const Table &table, Bool canBeConst) const
Check if tables used in expression have the same number of rows as the given table.
TableExprNode operator~() const
Unary bitwise negate-operator on integer TableExprNode's.
Bool getBool(const TableExprId &id) const
Definition ExprNode.h:629
static TableExprNode newColumnNode(const TableExprInfo &, const String &colName, const Vector< String > &fieldNames)
Create a column node on behalf of the Table class.
TENShPtr newGT(const TENShPtr &right) const
static TableExprNode newRownrNode(const TableExprInfo &, uInt origin)
Create rownumber() function node.
void disableApplySelection()
Do not apply the selection.
Definition ExprNode.h:273
Array< uChar > getColumnuChar(const Vector< uInt > &rownrs) const
Definition ExprNode.h:399
TableExprNode(const Double &value)
static TableExprNode newUDFNode(const String &name, const TableExprNodeSet &set, const TableExprInfo &tableInfo, const TaQLStyle &=TaQLStyle(0))
Create a user defined function node.
MArray< Double > getDoubleAS(const TableExprId &id) const
Definition ExprNode.h:657
Array< Int64 > getColumnInt64(const Vector< uInt > &rownrs) const
Definition ExprNode.h:409
Array< String > getColumnString(const RowNumbers &rownrs) const
Definition ExprNode.h:688
TableExprNode(const Array< Int64 > &value)
Array< Double > getArrayDouble(const TableExprId &id) const
Definition ExprNode.h:645
TableExprNode(const MArray< String > &value)
static TableExprNode newArrayPartNode(const TableExprNode &arrayNode, const TableExprNodeSet &indices, const TaQLStyle &=TaQLStyle(0))
Create ArrayElement node for the given array with the given index.
static TableExprNode newRowidNode(const TableExprInfo &)
Create rowid() function node.
TableExprNode(const StringDistance &value)
TableExprNode(const Array< Double > &value)
DataType dataType() const
Get the data type of the expression.
static TableExprNode newKeyConst(const TableRecord &, const Vector< String > &fieldNames)
Create a TableExprNodeConst for a table keyword (which is handled as a constant).
TableExprNode(const MVTime &value)
Array< Int64 > getArrayInt(const TableExprId &id) const
Definition ExprNode.h:643
TENShPtr newPlus(const TENShPtr &right) const
Construct a new node for the given operation.
const TableExprNodeRep * getNodeRep() const
Definition ExprNode.h:695
TableExprNode(const MArray< Int64 > &value)
TableExprNode(const TENShPtr &)
Construct a node from a node representation shared pointer which increments the reference count.
TableExprNode(const MArray< uChar > &value)
void adaptUnit(const Unit &)
Adapt the unit of the expression to the given unit (if not empty).
Array< Int > getColumnInt(const RowNumbers &rownrs) const
Definition ExprNode.h:674
Array< Bool > getColumnBool(const RowNumbers &rownrs) const
Get the value of the expression evaluated for the entire column.
Definition ExprNode.h:666
TENShPtr newAND(const TENShPtr &right) const
Array< String > getArrayString(const TableExprId &id) const
Definition ExprNode.h:649
Array< uShort > getColumnuShort(const Vector< uInt > &rownrs) const
Definition ExprNode.h:403
Array< uInt > getColumnuInt(const Vector< uInt > &rownrs) const
Definition ExprNode.h:407
TableExprNode(TableExprNodeRep *rep)
Construct from a node representation.
Definition ExprNode.h:256
const TENShPtr & getRep() const
returns const pointer to the underlying TableExprNodeRep object.
Definition ExprNode.h:693
static TableExprNode newRandomNode(const TableExprInfo &)
Create rand() function node.
Array< uInt > getColumnuInt(const RowNumbers &rownrs) const
Definition ExprNode.h:676
TableExprNode(const Array< Short > &value)
TableExprNode(const MArray< Double > &value)
Array< Complex > getColumnComplex(const Vector< uInt > &rownrs) const
Definition ExprNode.h:415
TableExprNode(const Bool &value)
Constructors to convert a constant value to a TableExprNode.
String getString(const TableExprId &id) const
Definition ExprNode.h:639
DataType getColumnDataType() const
Get the data type for doing a getColumn on the expression.
Array< Bool > getArrayBool(const TableExprId &id) const
Definition ExprNode.h:641
TableExprNode(const char *)
TableExprNode(const uInt64 &value)
void show(ostream &) const
Show the tree.
Definition ExprNode.h:691
TableExprNode(const MArray< uShort > &value)
TableExprNode(const TaqlRegex &value)
MVTime getDate(const TableExprId &id) const
Definition ExprNode.h:637
void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
Definition ExprNode.h:278
TableExprNode(const uInt &value)
TENShPtr newNE(const TENShPtr &right) const
static std::vector< TENShPtr > convertBlockTEN(Block< TableExprNode > &nodes)
convert Block of TableExprNode to vector of TENShPtr.
TableExprNode in(const TableExprNodeSet &set, const TaQLStyle &=TaQLStyle(0)) const
DComplex getDComplex(const TableExprId &id) const
Definition ExprNode.h:635
TableExprNode(const Array< DComplex > &value)
TENShPtr setBinaryNodeInfo(TableExprNodeBinary *tsnptr, const TENShPtr &right=TENShPtr()) const
Put the new binary node object in a shared pointer.
this file contains all the compiler specific defines
Definition mainpage.dox:28
TableExprNode runningAny(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1861
TableExprNode rmss(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1770
LatticeExprNode fractile(const LatticeExprNode &expr, const LatticeExprNode &fraction)
Determine the value of the element at the part fraction from the beginning of the given lattice.
TableExprNode pattern(const TableExprNode &node)
Definition ExprNode.h:1491
TableExprNode sums(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
The partial version of the functions above.
Definition ExprNode.h:1716
TableExprNode maxs(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1740
TableExprNode medians(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1776
TableExprNode boxedAny(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1921
TableExprNode boxedAll(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1927
TableExprNode sumSquares(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1728
LatticeExprNode exp(const LatticeExprNode &expr)
TableExprNode runningMin(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Functions operating for each element on a box around that element.
Definition ExprNode.h:1813
LatticeExprNode isNaN(const LatticeExprNode &expr)
Test if a value is a NaN.
TableExprNode runningMean(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1825
TableExprNode operator|(const TableExprNode &left, const TableExprNode &right)
Definition ExprNode.h:1190
TableExprNode substr(const TableExprNode &str, const TableExprNode &pos)
Definition ExprNode.h:1600
TableExprNode boxedVariance(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1891
TableExprNode angdist(const TableExprNode &pos1, const TableExprNode &pos2)
Angular distance between positions.
Definition ExprNode.h:1267
LatticeExprNode operator&&(const LatticeExprNode &left, const LatticeExprNode &right)
Logical binary operators.
TableExprNode cones(const TableExprNode &sourcePos, const TableExprNode &cones)
Cone search; test if the position of a source is inside a cone.
Definition ExprNode.h:1279
LatticeExprNode asin(const LatticeExprNode &expr)
TableExprNode means(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1746
LatticeExprNode fmod(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode boxedAvdev(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1903
LatticeExprNode acos(const LatticeExprNode &expr)
LatticeExprNode ndim(const LatticeExprNode &expr)
1-argument function to get the dimensionality of a lattice.
LatticeExprNode replace(const LatticeExprNode &arg1, const LatticeExprNode &arg2)
This function replaces every masked-off element in the first argument with the corresponding element ...
TableExprNode datetime(const TableExprNode &node)
Functions for date-values.
Definition ExprNode.h:1501
TableExprNode upcase(const TableExprNode &node)
Definition ExprNode.h:1472
LatticeExprNode mean(const LatticeExprNode &expr)
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode isFinite(const TableExprNode &node)
Function to test if a scalar or array is finite.
Definition ExprNode.h:1634
LatticeExprNode cosh(const LatticeExprNode &expr)
LatticeExprNode atan(const LatticeExprNode &expr)
TableExprNode mjdtodate(const TableExprNode &node)
Definition ExprNode.h:1506
TableExprNode cmonth(const TableExprNode &node)
Definition ExprNode.h:1531
TableExprNode operator&(const TableExprNode &left, const TableExprNode &right)
Definition ExprNode.h:1185
LatticeExprNode tanh(const LatticeExprNode &expr)
TableExprNode time(const TableExprNode &node)
Definition ExprNode.h:1584
LatticeExprNode sign(const LatticeExprNode &expr)
LatticeExprNode arg(const LatticeExprNode &expr)
LatticeExprNode log10(const LatticeExprNode &expr)
TableExprNode cdow(const TableExprNode &node)
Definition ExprNode.h:1541
TableExprNode transpose(const TableExprNode &array)
Transpose all axes of a (masked) array.
Definition ExprNode.h:1960
LatticeExprNode conj(const LatticeExprNode &expr)
LatticeExprNode formComplex(const LatticeExprNode &left, const LatticeExprNode &right)
Form a complex number from two real numbers.
TableExprNode ctime(const TableExprNode &node)
Definition ExprNode.h:1553
LatticeExprNode operator%(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode sinh(const LatticeExprNode &expr)
LatticeExprNode sum(const LatticeExprNode &expr)
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)
Definition ExprNode.h:1254
LatticeExprNode operator+(const LatticeExprNode &expr)
Global functions operating on a LatticeExprNode.
MVBaseline operator*(const RotMatrix &left, const MVBaseline &right)
Rotate a Baseline vector with rotation matrix and other multiplications.
TableExprNode sumSquare(const TableExprNode &array)
Definition ExprNode.h:1659
unsigned int uInt
Definition aipstype.h:49
TableExprNode boxedRms(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1909
TableExprNode weekday(const TableExprNode &node)
Definition ExprNode.h:1536
LatticeExprNode stddev(const LatticeExprNode &expr)
TableExprNode isInf(const TableExprNode &node)
Definition ExprNode.h:1630
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type.
TableExprNode amplitude(const TableExprNode &node)
The amplitude (i.e.
Definition ExprNode.h:1444
T norm(const TableVector< T > &tv)
Definition TabVecMath.h:412
TableExprNode phase(const TableExprNode &node)
The phase (i.e.
Definition ExprNode.h:1452
TableExprNode boxedStddev(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1897
LatticeExprNode operator-(const LatticeExprNode &expr)
TableExprNode anys(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1789
TableExprNode isdefined(const TableExprNode &array)
Function operating on a field resulting in a bool scalar.
Definition ExprNode.h:1979
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
Definition ExprNode.h:1991
LatticeExprNode tan(const LatticeExprNode &expr)
TableExprNode day(const TableExprNode &node)
Definition ExprNode.h:1527
TableExprNode anyCone(const TableExprNode &sourcePos, const TableExprNode &cones)
The result is always a Bool scalar telling if any cone contains the source.
Definition ExprNode.h:1285
TableExprNode nfalses(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1807
TableExprNode dms(const TableExprNode &node)
Definition ExprNode.h:1561
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
Definition ExprNode.h:1933
bool operator==(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
Definition Allocator.h:127
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
TableExprNode angdistx(const TableExprNode &pos1, const TableExprNode &pos2)
Angular distance as above, but only pair-wise enties are used if both arguments are arrays.
Definition ExprNode.h:1273
LatticeExprNode sin(const LatticeExprNode &expr)
Numerical 1-argument functions.
bool operator!=(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
Definition Allocator.h:133
LatticeExprNode operator/(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode ltrim(const TableExprNode &node)
Definition ExprNode.h:1592
LatticeExprNode atan2(const LatticeExprNode &left, const LatticeExprNode &right)
Numerical 2-argument functions.
LatticeExprNode variance(const LatticeExprNode &expr)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition aipsxtype.h:36
TableExprNode month(const TableExprNode &node)
Definition ExprNode.h:1523
TableExprNode capitalize(const TableExprNode &node)
Definition ExprNode.h:1482
TableExprNode downcase(const TableExprNode &node)
Definition ExprNode.h:1477
TableExprNode runningStddev(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1837
TableExprNode square(const TableExprNode &node)
Definition ExprNode.h:1350
LatticeExprNode any(const LatticeExprNode &expr)
Functions operating on a logical expression resulting in a scalar; Functions "any" (are any pixels "T...
TableExprNode year(const TableExprNode &node)
Definition ExprNode.h:1519
LatticeExprNode sqrt(const LatticeExprNode &expr)
TableExprNode date(const TableExprNode &node)
Definition ExprNode.h:1515
TableExprNode rtrim(const TableExprNode &node)
Definition ExprNode.h:1596
float Float
Definition aipstype.h:52
TableExprNode runningAll(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1867
TableExprNode arrayFlatten(const TableExprNode &array)
Flatten a masked array (get unmasked elements).
Definition ExprNode.h:1955
LatticeExprNode ntrue(const LatticeExprNode &expr)
TableExprNode findCone(const TableExprNode &sourcePos, const TableExprNode &cones)
The sourcePos can contain multiple sources.
Definition ExprNode.h:1291
T product(const TableVector< T > &tv)
Definition TabVecMath.h:383
TableExprNode cdate(const TableExprNode &node)
Definition ExprNode.h:1549
TableExprNode boxedMedian(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1915
TableExprNode fractiles(const TableExprNode &array, const TableExprNode &fraction, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1782
TableExprNode boolean(const TableExprNode &node)
Convert numeric or string value to bool (0, no, false, - means false)
Definition ExprNode.h:1436
TableExprNode stddevs(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1758
TableExprNode cube(const TableExprNode &node)
Definition ExprNode.h:1355
TableExprNode mjd(const TableExprNode &node)
Definition ExprNode.h:1511
LatticeExprNode avdev(const LatticeExprNode &expr)
String toString(const SubScanKey &subScanKey)
std::shared_ptr< TableExprNodeRep > TENShPtr
Definition ExprNodeRep.h:55
TableExprNode sqlpattern(const TableExprNode &node)
Definition ExprNode.h:1496
LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode avdevs(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1764
TableExprNode runningMax(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1819
TableExprNode products(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1722
TableExprNode integer(const TableExprNode &node)
Convert double, bool, or string to int (using floor).
Definition ExprNode.h:1432
LatticeExprNode log(const LatticeExprNode &expr)
TableExprNode boxedMean(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1885
LatticeExprNode iif(const LatticeExprNode &condition, const LatticeExprNode &arg1, const LatticeExprNode &arg2)
Function resembling the ternary ?: construct in C++.
TableExprNode regex(const TableExprNode &node)
Functions for regular expression matching and pattern matching.
Definition ExprNode.h:1487
int Int
Definition aipstype.h:48
TableExprNode variances(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1752
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
LatticeExprNode operator^(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode week(const TableExprNode &node)
Definition ExprNode.h:1580
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
TableExprNode alls(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1795
TableExprNode boxedMin(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1873
TableExprNode marray(const TableExprNode &array, const TableExprNode &mask)
Form a masked array.
Definition ExprNode.h:1939
TableExprNode trim(const TableExprNode &node)
Definition ExprNode.h:1588
TableExprNode boxedMax(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1879
TableExprNode ctodt(const TableExprNode &node)
Definition ExprNode.h:1545
TableExprNode ntrues(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1801
LatticeExprNode cos(const LatticeExprNode &expr)
LatticeExprNode floor(const LatticeExprNode &expr)
TableExprNode mins(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1734
TableExprNode runningVariance(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1831
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...
Definition ExprNode.h:1973
double Double
Definition aipstype.h:53
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)
LatticeExprNode median(const LatticeExprNode &expr)
LatticeExprNode all(const LatticeExprNode &expr)
LatticeExprNode nelements(const LatticeExprNode &expr)
1-argument function to get the number of elements in a lattice.
LatticeExprNode round(const LatticeExprNode &expr)
LatticeExprNode ceil(const LatticeExprNode &expr)
LatticeExprNode real(const LatticeExprNode &expr)
LatticeExprNode operator||(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode runningRms(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1849
LatticeExprNode nfalse(const LatticeExprNode &expr)
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44
LatticeExprNode imag(const LatticeExprNode &expr)
TableExprNode hdms(const TableExprNode &node)
Definition ExprNode.h:1565
TableExprNode strlength(const TableExprNode &node)
String functions on scalars or arrays.
Definition ExprNode.h:1467
TableExprNode runningMedian(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1855
TableExprNode hms(const TableExprNode &node)
Functions for angle-values.
Definition ExprNode.h:1557
unsigned long long uInt64
Definition aipsxtype.h:37
TableExprNode runningAvdev(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1843
TableExprNode arrayData(const TableExprNode &array)
Get the data array of a masked array.
Definition ExprNode.h:1945
TableExprNode arrayMask(const TableExprNode &array)
Get the mask of a masked array.
Definition ExprNode.h:1950
TableExprNode rms(const TableExprNode &array)
Definition ExprNode.h:1684