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;
53template <class T>
54class Block;
55template <class T>
56class MArray;
57
58// <summary>
59// Handle class for a table column expression tree
60// </summary>
61
62// <use visibility=export>
63
64// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
65// </reviewed>
66
67// <prerequisite>
68// # Classes you should understand before using this one.
69// <li> <linkto class=Table>Table</linkto>
70// <li> Note 199 describing
71// <a href="../notes/199.html">
72// TaQL</a>
73// </prerequisite>
74
75// <etymology>
76// TableExprNode represents a node in the tree reflecting a
77// table select expression.
78// </etymology>
79
80// <synopsis>
81// TableExprNode is the class to store a table select expression,
82// making it possible to select rows from the table. The selected
83// rows form a table which is a view of the original table.
84// <p>
85// TableExprNode is a handle class for the counted referenced class
86// TableExprNodeRep.
87// Classes (like TableExprNodePlusXX) derived from TableExprNodeRep
88// hold the individual
89// nodes in the expression, i.e. the operators and operands. The nodes
90// form a binary tree reflecting the expression.
91// E.g. the expression 2*COLUMN results in the node TableExprNodeTimes
92// with its children TableExprNodeConst and TableExprNodeColumn.
93// Constant subexpressions (like 2*3) are evaluated immediately and
94// only the result is stored as a node.
95// <p>
96// There are a few TableExprNode constructors taking a constant scalar or array.
97// In this way constant value are automatically converted to the
98// appropriate TableExprNodeConst object.
99// <p>
100// The derived classes also reflect the data type of the node.
101// Data types Bool, Int64, Double, DComplex and String are used.
102// Char, uChar, Short, uShort, Int and uInt are converted to Int64,
103// float to Double, and Complex to DComplex.
104// Binary operators +, -, *, /, %, &, }, ^, ==, >=, >, <, <= and != are
105// recognized. Also &&, ||, parentheses and unary +, -, ~ and ! are recognized.
106// For strings the binary operator + can also be used.
107// The operators have the normal C++ precedence.
108// Furthermore functions (such as sin, max, ceil) can be used in an expression.
109// <br>Operator() can be used to take a slice from an array.
110// <p>
111// The Table function col has to be used to create a TableExprNode
112// object for a column in the table. The Table
113// <linkto file="Table.h#keycol">operator()</linkto> can be used
114// the do the actual selection from the top TableExprNode object.
115// </synopsis>
116
117// <example>
118// <srcblock>
119// // Select from table X all rows where column RA<5 and where column
120// // SWITCH is true.
121// Table table("X");
122// Table subtable = table(table.col("RA") < 5 && table.col("SWITCH"));
123//
124// // Select from that result all rows where the concatenation of
125// // the strings in columns STR1 and STR2 is equal to the string
126// // in keyword STRKEY.
127// Table subsub = subtable(subtable.col("STR1") + subtable.col("STR2")
128// == subtable.key("STRKEY"));
129// </srcblock>
130// </example>
131
132// <motivation>
133// Having TableExprNode as a handle class makes it possible to
134// handle temporary objects created by the compiler in a smooth way.
135// TableExprNode and its derivations allow to store an expression
136// before actually evaluating it. This also allows the classes to
137// be used by the table expression parser defined in TableParse and
138// TableGram.
139//
140// For each operator a special derived class is implemented.
141// Another approach could have been to store the operator as
142// a flag and switch on that. However, that causes extra overhead
143// and the C++ virtual function mechanism is the designed for
144// these purposes.
145// </motivation>
146
147// <todo asof="$DATE:$">
148// # A List of bugs, limitations, extensions or planned refinements.
149// <li> add operations on arrays
150// <li> add selection by comparing with a set of values
151// </todo>
152
154 public:
156
157 // Unary operators on numeric TableExprNode's.
158 // <group>
161 // </group>
162 // Unary NOT-operator on boolean TableExprNode's.
164 // Unary bitwise negate-operator on integer TableExprNode's.
166
167 // Slicing in a node containing an array. It is possible to
168 // address a single pixel or an n-dimensional subarray.
169 // In case of a single pixel the result is a scalar node.
170 // Otherwise the result is an array node with the same dimensionality
171 // as the source.
172 // <br>Note that there exist TableExprNodeSet constructors to
173 // convert an <src>IPosition</src> or <src>Slicer</src> object
174 // automatically to a <src>TableExprNodeSet</src>.
175 // An <src>IPosition</src> addresses a single element and results in
176 // a scalar node, while a <src>Slicer</src> can address multiple
177 // elements and always results in an array node.
179
180 // The IN operator to test if a value is contained in an array or set.
181 // The array can also be a scalar.
182 // <group>
183 TableExprNode in(const TableExprNode& array, const TaQLStyle& = TaQLStyle(0)) const;
185 // </group>
186
187 // Use a unit for the given TableExprNode.
188 // Note that if a column has a unit, it is automatically set. In that case
189 // this can be used to convert units.
191
192 // Constructors to convert a constant value to a TableExprNode.
193 // The constructor for char* is also supported to convert a
194 // character-array to a string, since a two step conversion
195 // is not done automatically.
196 // <group>
204 TableExprNode(const Complex& value);
205 TableExprNode(const DComplex& value);
207 TableExprNode(const std::string& value);
208 TableExprNode(const char*);
220 // # The following constructor has to be explicit, othwerwise
221 // # Table(Vector<rownr_t>)
222 // # gives an ambiguous error as the preferred class RowNumbers
223 // # has a similar constructor.
245 // </group>
246
247 // Construct a node from a node representation shared pointer
248 // which increments the reference count.
250
251 // Construct from a node representation. It takes over the pointer, so the
252 // object gets deleted automatically.
254
255 // copy constructor (reference semantics).
257
258 // Assignment (reference semantics).
260
261 // The destructor deletes all the underlying TableExprNode objects,
263
264 // Does the node contain no actual node?
265 Bool isNull() const { return !node_p; }
266
267 // Do not apply the selection.
268 void disableApplySelection() { node_p->disableApplySelection(); }
269
270 // Re-create the column object for a selection of rows.
271 // Nothing is done if the node does not represent a column object.
272 void applySelection(const Vector<rownr_t>& rownrs) { node_p->applySelection(rownrs); }
273
274 // Get the table info of the expression node.
275 TableExprInfo getTableInfo() const { return node_p->getTableInfo(); }
276
277 // Get the table to which the expression node belongs.
278 // # [[deprecated ("Use getTableInfo().table() instead")]]
279 Table table() const __attribute__((deprecated("Use getTableInfo().table() instead"))) {
280 return getTableInfo().table();
281 }
282
283 // Get the unit of the expression.
284 const Unit& unit() const { return node_p->unit(); }
285
286 // Get the attributes of the expression.
287 const Record& attributes() const { return node_p->attributes(); }
288
289 // Get the data type of the expression.
290 // Currently the only possible values are TpBool, TpInt, TpDouble,
291 // TpDComplex, TpString, and TpOther.
292 // The latter is returned for a date or regex.
293 DataType dataType() const;
294
295 // Is the expression a scalar?
296 Bool isScalar() const { return (node_p->valueType() == TableExprNodeRep::VTScalar); }
297
298 // Get the number of rows in the table associated with this expression.
299 // One is returned if the expression is a constant or if no table is
300 // associated with it.
301 rownr_t nrow() const { return node_p->nrow(); }
302
303 // Get a value for this node in the given row.
304 // These functions are implemented in the derived classes and
305 // will usually invoke the get in their children and apply the
306 // operator on the resulting values.
307 // <group>
308 void get(const TableExprId& id, Bool& value) const;
309 void get(const TableExprId& id, Int64& value) const;
310 void get(const TableExprId& id, Double& value) const;
311 void get(const TableExprId& id, DComplex& value) const;
312 void get(const TableExprId& id, String& value) const;
313 void get(const TableExprId& id, TaqlRegex& value) const;
314 void get(const TableExprId& id, MVTime& value) const;
315 void get(const TableExprId& id, MArray<Bool>& value) const;
316 void get(const TableExprId& id, MArray<Int64>& value) const;
317 void get(const TableExprId& id, MArray<Double>& value) const;
318 void get(const TableExprId& id, MArray<DComplex>& value) const;
319 void get(const TableExprId& id, MArray<String>& value) const;
320 void get(const TableExprId& id, MArray<MVTime>& value) const;
321 void get(const TableExprId& id, Array<Bool>& value) const;
322 void get(const TableExprId& id, Array<Int64>& value) const;
323 void get(const TableExprId& id, Array<Double>& value) const;
324 void get(const TableExprId& id, Array<DComplex>& value) const;
325 void get(const TableExprId& id, Array<String>& value) const;
326 void get(const TableExprId& id, Array<MVTime>& value) const;
327 Bool getBool(const TableExprId& id) const;
328 Int64 getInt(const TableExprId& id) const;
329 Double getDouble(const TableExprId& id) const;
330 DComplex getDComplex(const TableExprId& id) const;
331 MVTime getDate(const TableExprId& id) const;
332 String getString(const TableExprId& id) const;
333 Array<Bool> getArrayBool(const TableExprId& id) const;
334 Array<Int64> getArrayInt(const TableExprId& id) const;
338 Array<MVTime> getArrayDate(const TableExprId& id) const;
339 // Get a value as an array, even it it is a scalar.
340 // This is useful in case one can give an argument as scalar or array.
341 // <group>
342 MArray<Bool> getBoolAS(const TableExprId& id) const;
343 MArray<Int64> getIntAS(const TableExprId& id) const;
344 MArray<Double> getDoubleAS(const TableExprId& id) const;
346 MArray<String> getStringAS(const TableExprId& id) const;
347 MArray<MVTime> getDateAS(const TableExprId& id) const;
348 // </group>
349
350 // </group>
351
352 // Get the data type for doing a getColumn on the expression.
353 // This is the data type of the column if the expression
354 // consists of a single column only.
355 // Otherwise it is the expression data type as returned by
356 // function <src>dataType</src>.
357 DataType getColumnDataType() const;
358
359 // Get the value of the expression evaluated for the entire column.
360 // The data of function called should match the data type as
361 // returned by function <src>getColumnDataType</src>.
362 // <group>
363 Array<Bool> getColumnBool(const RowNumbers& rownrs) const;
364 Array<uChar> getColumnuChar(const RowNumbers& rownrs) const;
365 Array<Short> getColumnShort(const RowNumbers& rownrs) const;
366 Array<uShort> getColumnuShort(const RowNumbers& rownrs) const;
367 Array<Int> getColumnInt(const RowNumbers& rownrs) const;
368 Array<uInt> getColumnuInt(const RowNumbers& rownrs) const;
369 Array<Int64> getColumnInt64(const RowNumbers& rownrs) const;
370 Array<Float> getColumnFloat(const RowNumbers& rownrs) const;
371 Array<Double> getColumnDouble(const RowNumbers& rownrs) const;
372 Array<Complex> getColumnComplex(const RowNumbers& rownrs) const;
373 Array<DComplex> getColumnDComplex(const RowNumbers& rownrs) const;
374 Array<String> getColumnString(const RowNumbers& rownrs) const;
375 // </group>
376
377 // The same functions as above for the old Vector<uInt>.
378 // They are primarily meant for CASA's SplatalogueTable class.
379 // Normally they should not be used, hence declared private
380 // unless told otherwise.
381#ifndef IMPLICIT_CTDS_32BIT
382 private:
383#endif
384 // <group>
386 return getColumnBool(RowNumbers(rownrs));
387 }
389 return getColumnuChar(RowNumbers(rownrs));
390 }
392 return getColumnShort(RowNumbers(rownrs));
393 }
395 return getColumnuShort(RowNumbers(rownrs));
396 }
397 Array<Int> getColumnInt(const Vector<uInt>& rownrs) const {
398 return getColumnInt(RowNumbers(rownrs));
399 }
401 return getColumnuInt(RowNumbers(rownrs));
402 }
404 return getColumnInt64(RowNumbers(rownrs));
405 }
407 return getColumnFloat(RowNumbers(rownrs));
408 }
410 return getColumnDouble(RowNumbers(rownrs));
411 }
413 return getColumnComplex(RowNumbers(rownrs));
414 }
416 return getColumnDComplex(RowNumbers(rownrs));
417 }
419 return getColumnString(RowNumbers(rownrs));
420 }
421 // </group>
422 public:
423 // Show the tree.
424 void show(ostream&) const;
425
426 // Convert the tree to a number of range vectors which at least
427 // select the same things.
428 // This function is very useful to convert the expression to
429 // some intervals covering the select expression. This can
430 // be used to do a rough fast selection via an index and do the
431 // the slower final selection on that much smaller subset.
432 // The function can only convert direct comparisons of columns
433 // with constants (via ==, !=, >, >=, < or <=) and their combinations
434 // using && or ||.
436
437 // Check if tables used in expression have the same number of
438 // rows as the given table.
439 Bool checkTableSize(const Table& table, Bool canBeConst) const;
440
441 // Create a column node or constant keyword node.
442 static TableExprNode keyCol(const TableExprInfo& tabInfo, const String& name,
443 const Vector<String>& fieldNames);
444
445 // Create a column node on behalf of the Table class.
446 // <src>fieldNames</src> indicate a possible field in a column of Records.
447 // For builtin data types another type of node is created than
448 // for other data types.
449 static TableExprNode newColumnNode(const TableExprInfo&, const String& colName,
450 const Vector<String>& fieldNames);
451
452 // Create a TableExprNodeConst for a table keyword
453 // (which is handled as a constant).
454 // <src>fieldNames</src> tells the name of the keyword and possible subrecords.
455 static TableExprNode newKeyConst(const TableRecord&, const Vector<String>& fieldNames);
456
457 // Handle all field names except the last one. ALl of them must
458 // be records. The last record is returned.
459 // fullName is filled with the full keyword name separated by dots.
460 static TableRecord* findLastKeyRec(const TableRecord& keyset, const Vector<String>& fieldNames,
461 String& fullName);
462
463 // Throw invalid data type exception.
464 static void throwInvDT(const String& message);
465
466 // Create function node of the given type with the given arguments.
467 // <group>
469 const TableExprInfo& tabInfo,
470 const TaQLStyle& = TaQLStyle(0));
473 const TableExprNode& node2);
475 const TableExprNode& node2, const TableExprNode& node3);
477 const TableExprNodeSet& axes);
479 const TableExprNode& node, const TableExprNodeSet& axes);
480 // </group>
481
482 // Create a user defined function node.
484 const TableExprInfo& tableInfo, const TaQLStyle& = TaQLStyle(0));
485
486 // Create cone function node of the given type with the given arguments.
487 // <group>
489 uInt origin = 0);
491 const TableExprNode& node2);
493 const TableExprNode& node2, const TableExprNode& node3);
494 // </group>
495
496 // Create rownumber() function node.
497 // Origin indicates whether the first row should be zero (for C++ binding)
498 // or an other value (one for TaQL binding).
500
501 // Create rowid() function node.
502 // Origin is always 0.
504
505 // Create rand() function node.
507
508 // Create ArrayElement node for the given array with the given index.
509 // The origin is 0 for C++ and 1 for TaQL.
511 const TableExprNodeSet& indices,
512 const TaQLStyle& = TaQLStyle(0));
513
514 // returns const pointer to the underlying TableExprNodeRep object.
515 const TENShPtr& getRep() const;
516 const TableExprNodeRep* getNodeRep() const;
517
518 // Adapt the unit of the expression to the given unit (if not empty).
519 void adaptUnit(const Unit&);
520
521 // Construct a new node for the given operation.
522 // <group>
523 TENShPtr newPlus(const TENShPtr& right) const;
524 TENShPtr newMinus(const TENShPtr& right) const;
525 TENShPtr newTimes(const TENShPtr& right) const;
526 TENShPtr newDivide(const TENShPtr& right) const;
527 TENShPtr newModulo(const TENShPtr& right) const;
528 TENShPtr newBitAnd(const TENShPtr& right) const;
529 TENShPtr newBitOr(const TENShPtr& right) const;
530 TENShPtr newBitXor(const TENShPtr& right) const;
531 TENShPtr newEQ(const TENShPtr& right) const;
532 TENShPtr newNE(const TENShPtr& right) const;
533 TENShPtr newGE(const TENShPtr& right) const;
534 TENShPtr newGT(const TENShPtr& right) const;
535 TENShPtr newIN(const TENShPtr& right, const TaQLStyle&) const;
536 TENShPtr newOR(const TENShPtr& right) const;
537 TENShPtr newAND(const TENShPtr& right) const;
538 // </group>
539
540 private:
541 // Put the new binary node object in a shared pointer.
542 // Set the node's info and adapt the children if needed.
543 // If the node is constant, it is evaluated and returned as result.
545
546 // convert Block of TableExprNode to vector of TENShPtr.
547 static std::vector<TENShPtr> convertBlockTEN(Block<TableExprNode>& nodes);
548
549 // The actual (counted referenced) representation of a node.
551};
552
553inline void TableExprNode::ranges(Block<TableExprRange>& blrange) { node_p->ranges(blrange); }
554
555// # Get the value of an expression.
556inline void TableExprNode::get(const TableExprId& id, Bool& value) const {
557 value = node_p->getBool(id);
558}
559inline void TableExprNode::get(const TableExprId& id, Int64& value) const {
560 value = node_p->getInt(id);
561}
562inline void TableExprNode::get(const TableExprId& id, Double& value) const {
563 value = node_p->getDouble(id);
564}
565inline void TableExprNode::get(const TableExprId& id, DComplex& value) const {
566 value = node_p->getDComplex(id);
567}
568inline void TableExprNode::get(const TableExprId& id, String& value) const {
569 value = node_p->getString(id);
570}
571inline void TableExprNode::get(const TableExprId& id, TaqlRegex& value) const {
572 value = node_p->getRegex(id);
573}
574inline void TableExprNode::get(const TableExprId& id, MVTime& value) const {
575 value = node_p->getDate(id);
576}
577inline void TableExprNode::get(const TableExprId& id, MArray<Bool>& value) const {
578 value = node_p->getArrayBool(id);
579}
580inline void TableExprNode::get(const TableExprId& id, MArray<Int64>& value) const {
581 value = node_p->getArrayInt(id);
582}
583inline void TableExprNode::get(const TableExprId& id, MArray<Double>& value) const {
584 value = node_p->getArrayDouble(id);
585}
586inline void TableExprNode::get(const TableExprId& id, MArray<DComplex>& value) const {
587 value = node_p->getArrayDComplex(id);
588}
589inline void TableExprNode::get(const TableExprId& id, MArray<String>& value) const {
590 value = node_p->getArrayString(id);
591}
592inline void TableExprNode::get(const TableExprId& id, MArray<MVTime>& value) const {
593 value = node_p->getArrayDate(id);
594}
595inline void TableExprNode::get(const TableExprId& id, Array<Bool>& value) const {
596 value = node_p->getArrayBool(id).array();
597}
598inline void TableExprNode::get(const TableExprId& id, Array<Int64>& value) const {
599 value = node_p->getArrayInt(id).array();
600}
601inline void TableExprNode::get(const TableExprId& id, Array<Double>& value) const {
602 value = node_p->getArrayDouble(id).array();
603}
604inline void TableExprNode::get(const TableExprId& id, Array<DComplex>& value) const {
605 value = node_p->getArrayDComplex(id).array();
606}
607inline void TableExprNode::get(const TableExprId& id, Array<String>& value) const {
608 value = node_p->getArrayString(id).array();
609}
610inline void TableExprNode::get(const TableExprId& id, Array<MVTime>& value) const {
611 value = node_p->getArrayDate(id).array();
612}
613inline Bool TableExprNode::getBool(const TableExprId& id) const { return node_p->getBool(id); }
614inline Int64 TableExprNode::getInt(const TableExprId& id) const { return node_p->getInt(id); }
616 return node_p->getDouble(id);
617}
618inline DComplex TableExprNode::getDComplex(const TableExprId& id) const {
619 return node_p->getDComplex(id);
620}
621inline MVTime TableExprNode::getDate(const TableExprId& id) const { return node_p->getDate(id); }
623 return node_p->getString(id);
624}
626 return node_p->getArrayBool(id).array();
627}
629 return node_p->getArrayInt(id).array();
630}
632 return node_p->getArrayDouble(id).array();
633}
635 return node_p->getArrayDComplex(id).array();
636}
638 return node_p->getArrayString(id).array();
639}
641 return node_p->getArrayDate(id).array();
642}
644 return node_p->getBoolAS(id);
645}
647 return node_p->getIntAS(id);
648}
650 return node_p->getDoubleAS(id);
651}
653 return node_p->getDComplexAS(id);
654}
656 return node_p->getStringAS(id);
657}
659 return node_p->getDateAS(id);
660}
661
663 return node_p->getColumnBool(rownrs);
664}
666 return node_p->getColumnuChar(rownrs);
667}
669 return node_p->getColumnShort(rownrs);
670}
672 return node_p->getColumnuShort(rownrs);
673}
675 return node_p->getColumnInt(rownrs);
676}
678 return node_p->getColumnuInt(rownrs);
679}
681 return node_p->getColumnInt64(rownrs);
682}
684 return node_p->getColumnFloat(rownrs);
685}
687 return node_p->getColumnDouble(rownrs);
688}
690 return node_p->getColumnComplex(rownrs);
691}
693 return node_p->getColumnDComplex(rownrs);
694}
696 return node_p->getColumnString(rownrs);
697}
698
699inline void TableExprNode::show(ostream& os) const { node_p->show(os, 0); }
700inline const TENShPtr& TableExprNode::getRep() const { return node_p; }
701inline const TableExprNodeRep* TableExprNode::getNodeRep() const { return node_p.get(); }
702
703// Define all global functions operating on a TableExprNode.
704// <group name=GlobalTableExprNode>
705
706// # Define the operations we allow.
707// # Note that the arguments are defined as const. This is necessary
708// # because the compiler generates temporaries when converting a constant
709// # to a TableExprNode using the constructors. Temporaries has to be const.
710// # However, we have to delete created nodes, so lnode_p and rnode_p
711// # cannot be const. The const arguments are casted to a non-const in
712// # the function fill which calls the non-const function simplify.
713
714// Arithmetic operators for numeric TableExprNode's.
715// <group>
716// + is also defined for strings (means concatenation).
717TableExprNode operator+(const TableExprNode& left, const TableExprNode& right);
718TableExprNode operator-(const TableExprNode& left, const TableExprNode& right);
719TableExprNode operator*(const TableExprNode& left, const TableExprNode& right);
720TableExprNode operator/(const TableExprNode& left, const TableExprNode& right);
721TableExprNode operator%(const TableExprNode& left, const TableExprNode& right);
722TableExprNode operator&(const TableExprNode& left, const TableExprNode& right);
723TableExprNode operator|(const TableExprNode& left, const TableExprNode& right);
724TableExprNode operator^(const TableExprNode& left, const TableExprNode& right);
725// </group>
726
727// Comparison operators.
728// <group>
729TableExprNode operator==(const TableExprNode& left, const TableExprNode& right);
730TableExprNode operator!=(const TableExprNode& left, const TableExprNode& right);
731// Not defined for Bool.
732// <group>
733TableExprNode operator>=(const TableExprNode& left, const TableExprNode& right);
734TableExprNode operator>(const TableExprNode& left, const TableExprNode& right);
735TableExprNode operator<=(const TableExprNode& left, const TableExprNode& right);
736TableExprNode operator<(const TableExprNode& left, const TableExprNode& right);
737// </group>
738// </group>
739
740// Logical operators to combine boolean TableExprNode's.
741// A null TableExprNode object is ignored, so it is possible to
742// build up a full expression gradually.
743// <group>
746// </group>
747
748// Functions to return whether a value is "relatively" near another.
749// Returns <src> tol > abs(val2 - val1)/max(abs(val1),(val2))</src>.
750// If tol <= 0, returns val1 == val2. If either val is 0.0, takes
751// care of area around the minimum number that can be represented.
752// <br>The nearAbs functions return whether a value is "absolutely" near
753// another. Returns <src> tol > abs(val2 - val1)</src>.
754// Default tolerance is 1.0e-13.
755// They operate on scalars and arrays.
756// <group>
757TableExprNode near(const TableExprNode& left, const TableExprNode& right);
758TableExprNode near(const TableExprNode& left, const TableExprNode& right,
759 const TableExprNode& tolerance);
760TableExprNode nearAbs(const TableExprNode& left, const TableExprNode& right);
761TableExprNode nearAbs(const TableExprNode& left, const TableExprNode& right,
762 const TableExprNode& tolerance);
763// </group>
764
765// Angular distance between positions.
766// Both arguments have to be arrays. If both arrays contain 2 values
767// (ra and dec), the result is a scalar.
768// Otherwise the arrays have to contain a multiple of 2 values and the
769// result is a 2-dim array giving the distance of each position in the
770// first array to each position in the second array.
771TableExprNode angdist(const TableExprNode& pos1, const TableExprNode& pos2);
772
773// Angular distance as above, but only pair-wise enties are used if
774// both arguments are arrays.
775TableExprNode angdistx(const TableExprNode& pos1, const TableExprNode& pos2);
776
777// Cone search; test if the position of a source is inside a cone.
778// <br>Argument <src>sourcePos</src> must be a double array
779// containing two values (ra and dec of source) in radians.
780// <br>Argument <src>cones</src> must be a double array
781// specifying the position of the cone centers and radii in radians.
782// So the array must contain three values (ra,dec,radius)
783// or a multiple of it.
784// <group>
785// The result is a bool array telling for each cone if it contains the
786// source. If there is only one cone, the result is a scalar.
787TableExprNode cones(const TableExprNode& sourcePos, const TableExprNode& cones);
788// The result is always a Bool scalar telling if any cone contains
789// the source.
790TableExprNode anyCone(const TableExprNode& sourcePos, const TableExprNode& cones);
791// The sourcePos can contain multiple sources.
792// The result is a double array giving the index of the first
793// cone containing the corresponding source.
794// If there is one source, the result is a double scalar.
795TableExprNode findCone(const TableExprNode& sourcePos, const TableExprNode& cones);
796// </group>
797
798// Cone search as above.
799// However, the cone positions and radii are specified separately
800// and (virtually) a larger array containing every combination of
801// position/radius is formed.
802// <group>
803TableExprNode cones(const TableExprNode& sourcePos, const TableExprNode& conePos,
804 const TableExprNode& radii);
805TableExprNode anyCone(const TableExprNode& sourcePos, const TableExprNode& conePos,
806 const TableExprNode& radii);
807TableExprNode findCone(const TableExprNode& sourcePos, const TableExprNode& conePos,
808 const TableExprNode& radii);
809// </group>
810
811// Transcendental functions that can be applied to essentially all numeric
812// nodes containing scalars or arrays.
813// <group>
814TableExprNode sin(const TableExprNode& node);
815TableExprNode sinh(const TableExprNode& node);
816TableExprNode cos(const TableExprNode& node);
817TableExprNode cosh(const TableExprNode& node);
818TableExprNode exp(const TableExprNode& node);
819TableExprNode log(const TableExprNode& node);
823TableExprNode cube(const TableExprNode& node);
824TableExprNode sqrt(const TableExprNode& node);
825TableExprNode norm(const TableExprNode& node);
826// </group>
827
828// Transcendental functions applied to to nodes containing scalars or
829// arrays with double values.
830// They are invalid for Complex nodes.
831// <group>
832TableExprNode asin(const TableExprNode& node);
833TableExprNode acos(const TableExprNode& node);
834TableExprNode atan(const TableExprNode& node);
836TableExprNode tan(const TableExprNode& node);
837TableExprNode tanh(const TableExprNode& node);
838TableExprNode sign(const TableExprNode& node);
840TableExprNode ceil(const TableExprNode& node);
841TableExprNode abs(const TableExprNode& node);
844// </group>
845
846// String functions on scalars or arrays.
847// <group>
852TableExprNode trim(const TableExprNode& node);
855TableExprNode substr(const TableExprNode& str, const TableExprNode& pos);
856TableExprNode substr(const TableExprNode& str, const TableExprNode& pos, const TableExprNode& npos);
857TableExprNode replace(const TableExprNode& str, const TableExprNode& patt);
858TableExprNode replace(const TableExprNode& str, const TableExprNode& patt,
859 const TableExprNode& repl);
860// </group>
861
862// Functions for regular expression matching and
863// pattern matching. Defined for scalars and arrays.
864// <br><src>pattern</src> is for a file name like pattern.
865// <br><src>sqlpattern</src> is for an SQL like pattern.
866// <group>
870// </group>
871
872// Functions for date-values. Defined for scalars and arrays.
873// # Note, ctod is called ctodt, because Mac OS-X defines a macro
874// # ctod in param.h
875// <group>
878TableExprNode mjd(const TableExprNode& node);
879TableExprNode date(const TableExprNode& node);
880TableExprNode year(const TableExprNode& node);
882TableExprNode day(const TableExprNode& node);
885TableExprNode cdow(const TableExprNode& node);
889TableExprNode week(const TableExprNode& node);
890TableExprNode time(const TableExprNode& node);
891// </group>
892
893// Functions for angle-values. Defined for scalars and arrays.
894// dhms converts pairs of values to hms and dms and only works for arrays.
895// <group>
896TableExprNode hms(const TableExprNode& node);
897TableExprNode dms(const TableExprNode& node);
898TableExprNode hdms(const TableExprNode& node);
899// </group>
900
901// Function to convert any value to a string.
902// See TaQL note 199 for possible format values.
903// <group>
905TableExprNode toString(const TableExprNode& node, const TableExprNode& format);
906// </group>
907
908// Function to test if a scalar or array is NaN (not-a-number).
909// It results in a Bool scalar or array.
911
912// Function to test if a scalar or array is finite.
913// It results in a Bool scalar or array.
915
916// Minimum or maximum of 2 nodes.
917// Makes sense for numeric and String values. For Complex values
918// the norm is compared.
919// One or both arguments can be scalar or array.
920// <group>
921TableExprNode min(const TableExprNode& a, const TableExprNode& b);
922TableExprNode max(const TableExprNode& a, const TableExprNode& b);
923// </group>
924
925// The complex conjugate of a complex node.
926// Defined for scalars and arrays.
927TableExprNode conj(const TableExprNode& node);
928
929// The real part of a complex node.
930// Defined for scalars and arrays.
931TableExprNode real(const TableExprNode& node);
932
933// The imaginary part of a complex node.
934// Defined for scalars and arrays.
935TableExprNode imag(const TableExprNode& node);
936
937// Convert double, bool, or string to int (using floor).
939
940// Convert numeric or string value to bool (0, no, false, - means false)
942
943// The amplitude (i.e. sqrt(re*re + im*im)) of a complex node.
944// This is a synonym for function abs.
945// Defined for scalars and arrays.
947
948// The phase (i.e. atan2(im, re)) of a complex node.
949// This is a synonym for function arg.
950// Defined for scalars and arrays.
952
953// The arg (i.e. atan2(im, re)) of a complex node.
954// Defined for scalars and arrays.
955TableExprNode arg(const TableExprNode& node);
956
957// Form a complex number from two Doubles.
958// One or both arguments can be scalar or array.
960// Form a complex number from a string.
961// Defined for scalars and arrays.
963
964// Functions operating on a Double or Complex scalar or array resulting in
965// a scalar with the same data type.
966// <group>
970// </group>
971
972// Functions operating on a Double scalar or array resulting in
973// a Double scalar.
974// <group>
984// </group>
985
986// <group>
991// </group>
992
993// The partial version of the functions above.
994// They are applied to the array subsets defined by the axes in the set
995// using the partialXXX functions in ArrayMath.
996// The axes must be 0-relative.
997// <group>
998TableExprNode sums(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
999TableExprNode products(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1000TableExprNode sumSquares(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1001TableExprNode mins(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1002TableExprNode maxs(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1003TableExprNode means(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1004TableExprNode variances(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1005TableExprNode stddevs(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1006TableExprNode avdevs(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1007TableExprNode rmss(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1008TableExprNode medians(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1010 const TableExprNodeSet& collapseAxes);
1011TableExprNode anys(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1012TableExprNode alls(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1013TableExprNode ntrues(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1014TableExprNode nfalses(const TableExprNode& array, const TableExprNodeSet& collapseAxes);
1015// </group>
1016
1017// Functions operating for each element on a box around that element.
1018// The elements at the edges (where no full box can be made) are set to 0.
1019// <group>
1020TableExprNode runningMin(const TableExprNode& array, const TableExprNodeSet& halfBoxWidth);
1021TableExprNode runningMax(const TableExprNode& array, const TableExprNodeSet& halfBoxWidth);
1022TableExprNode runningMean(const TableExprNode& array, const TableExprNodeSet& halfBoxWidth);
1026TableExprNode runningRms(const TableExprNode& array, const TableExprNodeSet& halfBoxWidth);
1028TableExprNode runningAny(const TableExprNode& array, const TableExprNodeSet& halfBoxWidth);
1029TableExprNode runningAll(const TableExprNode& array, const TableExprNodeSet& halfBoxWidth);
1030// </group>
1031
1032// Create an array of the given shape and fill it with the values.
1033// The <src>values</src> array is rewound as needed.
1035
1036// Form a masked array.
1038
1039// Get the data array of a masked array.
1041
1042// Flatten a masked array (get unmasked elements).
1044
1045// Get the mask of a masked array.
1046// If the array has no mask, it return an array with all False values.
1048
1049// Get the diagonal of a (masked) array;
1050// If the array is not a Matrix, it will take the diagonals of the
1051// subarrays given by the two axes in the axes argument. Those
1052// axes have to have the same length (thus each subarray is a Matrix).
1053// If no axes are given, they default to the first two axes.
1054// <br>The <src>diag</src> argument tells which diagonal to take.
1055// 0 is the main diagonal, >0 is above main diagonal, <0 is below.
1059 const TableExprNode& diag);
1060
1061// Transpose all axes of a (masked) array.
1063// Transpose a (masked) array by making the given axes the first axes.
1065
1066// Function operating on a field resulting in a bool scalar.
1067// It can be used to test if a column has an array in the current row.
1068// It can also be used to test if a record contains a field.
1070
1071// Functions operating on any scalar or array resulting in a Double scalar.
1072// A scalar has 1 element and dimensionality 0.
1073// <group>
1076// </group>
1077
1078// Function operating on any scalar or array resulting in a Double array
1079// containing the shape. A scalar has shape [1].
1081
1082// Function resembling the ternary <src>?:</src> construct in C++.
1083// The argument "condition" has to be a Bool value.
1084// If an element in "condition" is True, the corresponding element from
1085// "arg1" is taken, otherwise it is taken from "arg2".
1086// The arguments can be scalars or array or any combination.
1087TableExprNode iif(const TableExprNode& condition, const TableExprNode& arg1,
1088 const TableExprNode& arg2);
1089// </group>
1090
1091inline TableExprNode operator+(const TableExprNode& left, const TableExprNode& right) {
1092 return left.newPlus(right.getRep());
1093}
1094inline TableExprNode operator-(const TableExprNode& left, const TableExprNode& right) {
1095 return left.newMinus(right.getRep());
1096}
1097inline TableExprNode operator*(const TableExprNode& left, const TableExprNode& right) {
1098 return left.newTimes(right.getRep());
1099}
1100inline TableExprNode operator/(const TableExprNode& left, const TableExprNode& right) {
1101 return left.newDivide(right.getRep());
1102}
1103inline TableExprNode operator%(const TableExprNode& left, const TableExprNode& right) {
1104 return left.newModulo(right.getRep());
1105}
1106inline TableExprNode operator&(const TableExprNode& left, const TableExprNode& right) {
1107 return left.newBitAnd(right.getRep());
1108}
1109inline TableExprNode operator|(const TableExprNode& left, const TableExprNode& right) {
1110 return left.newBitOr(right.getRep());
1111}
1112inline TableExprNode operator^(const TableExprNode& left, const TableExprNode& right) {
1113 return left.newBitXor(right.getRep());
1114}
1115inline TableExprNode operator==(const TableExprNode& left, const TableExprNode& right) {
1116 return left.newEQ(right.getRep());
1117}
1118inline TableExprNode operator!=(const TableExprNode& left, const TableExprNode& right) {
1119 return left.newNE(right.getRep());
1120}
1121inline TableExprNode operator>(const TableExprNode& left, const TableExprNode& right) {
1122 return left.newGT(right.getRep());
1123}
1124inline TableExprNode operator>=(const TableExprNode& left, const TableExprNode& right) {
1125 return left.newGE(right.getRep());
1126}
1127inline TableExprNode operator<=(const TableExprNode& left, const TableExprNode& right) {
1128 return right.newGE(left.getRep());
1129}
1130inline TableExprNode operator<(const TableExprNode& left, const TableExprNode& right) {
1131 return right.newGT(left.getRep());
1132}
1133inline TableExprNode TableExprNode::in(const TableExprNode& right, const TaQLStyle& style) const {
1134 return newIN(right.getRep(), style);
1135}
1137 // C++ indexing is 0-based.
1138 return newArrayPartNode(*this, indices, TaQLStyle(0));
1139}
1140
1141inline TableExprNode near(const TableExprNode& left, const TableExprNode& right) {
1143}
1144inline TableExprNode near(const TableExprNode& left, const TableExprNode& right,
1145 const TableExprNode& tolerance) {
1146 return TableExprNode::newFunctionNode(TableExprFuncNode::near3FUNC, left, right, tolerance);
1147}
1148inline TableExprNode nearAbs(const TableExprNode& left, const TableExprNode& right) {
1150}
1151inline TableExprNode nearAbs(const TableExprNode& left, const TableExprNode& right,
1152 const TableExprNode& tolerance) {
1154}
1170inline TableExprNode cones(const TableExprNode& sourcePos, const TableExprNode& conePos,
1171 const TableExprNode& radii) {
1172 return TableExprNode::newConeNode(TableExprFuncNode::cones3FUNC, sourcePos, conePos, radii);
1173}
1174inline TableExprNode anyCone(const TableExprNode& sourcePos, const TableExprNode& conePos,
1175 const TableExprNode& radii) {
1176 return TableExprNode::newConeNode(TableExprFuncNode::anycone3FUNC, sourcePos, conePos, radii);
1177}
1178inline TableExprNode findCone(const TableExprNode& sourcePos, const TableExprNode& conePos,
1179 const TableExprNode& radii) {
1180 return TableExprNode::newConeNode(TableExprFuncNode::findcone3FUNC, sourcePos, conePos, radii);
1181}
1362inline TableExprNode toString(const TableExprNode& node, const TableExprNode& format) {
1364}
1383inline TableExprNode substr(const TableExprNode& node, const TableExprNode& pos,
1384 const TableExprNode& npos) {
1386}
1390inline TableExprNode replace(const TableExprNode& node, const TableExprNode& patt,
1391 const TableExprNode& repl) {
1393}
1436inline TableExprNode fractile(const TableExprNode& node, const TableExprNode& fraction) {
1438}
1485 const TableExprNodeSet& axes) {
1487}
1500inline TableExprNode runningMin(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1502}
1503inline TableExprNode runningMax(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1505}
1506inline TableExprNode runningMean(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1508}
1510 const TableExprNodeSet& halfBoxWidth) {
1512}
1514 const TableExprNodeSet& halfBoxWidth) {
1516}
1517inline TableExprNode runningAvdev(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1519}
1520inline TableExprNode runningRms(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1522}
1524 const TableExprNodeSet& halfBoxWidth) {
1526}
1527inline TableExprNode runningAny(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1529}
1530inline TableExprNode runningAll(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1532}
1533inline TableExprNode boxedMin(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1535}
1536inline TableExprNode boxedMax(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1538}
1539inline TableExprNode boxedMean(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1541}
1543 const TableExprNodeSet& halfBoxWidth) {
1545}
1546inline TableExprNode boxedStddev(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1548}
1549inline TableExprNode boxedAvdev(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1551}
1552inline TableExprNode boxedRms(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1554}
1555inline TableExprNode boxedMedian(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1557}
1558inline TableExprNode boxedAny(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1560}
1561inline TableExprNode boxedAll(const TableExprNode& node, const TableExprNodeSet& halfBoxWidth) {
1563}
1580 // Needs an empty axes argument.
1583}
1603inline TableExprNode iif(const TableExprNode& condition, const TableExprNode& arg1,
1604 const TableExprNode& arg2) {
1605 return TableExprNode::newFunctionNode(TableExprFuncNode::iifFUNC, condition, arg1, arg2);
1606}
1607
1608} // namespace casacore
1609
1610#endif
String: the storage and methods of handling collections of characters.
Definition String.h:355
@ 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.
Array< DComplex > getColumnDComplex(const RowNumbers &rownrs) const
Definition ExprNode.h:692
Array< Short > getColumnShort(const Vector< uInt > &rownrs) const
Definition ExprNode.h:391
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:614
TENShPtr node_p
The actual (counted referenced) representation of a node.
Definition ExprNode.h:550
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:634
Double getDouble(const TableExprId &id) const
Definition ExprNode.h:615
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:301
~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:415
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:287
MArray< MVTime > getDateAS(const TableExprId &id) const
Definition ExprNode.h:658
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:655
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:275
TableExprNode(const MArray< Bool > &value)
TableExprNode(const Array< Bool > &value)
Array< uShort > getColumnuShort(const RowNumbers &rownrs) const
Definition ExprNode.h:671
Array< String > getColumnString(const Vector< uInt > &rownrs) const
Definition ExprNode.h:418
MArray< Bool > getBoolAS(const TableExprId &id) const
Get a value as an array, even it it is a scalar.
Definition ExprNode.h:643
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:409
TableExprNode operator!() const
Unary NOT-operator on boolean TableExprNode's.
MArray< Int64 > getIntAS(const TableExprId &id) const
Definition ExprNode.h:646
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:385
Array< Int64 > getColumnInt64(const RowNumbers &rownrs) const
Definition ExprNode.h:680
TENShPtr newBitXor(const TENShPtr &right) const
Array< uChar > getColumnuChar(const RowNumbers &rownrs) const
Definition ExprNode.h:665
TableExprNode(const DComplex &value)
Array< Complex > getColumnComplex(const RowNumbers &rownrs) const
Definition ExprNode.h:689
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:1133
Bool isScalar() const
Is the expression a scalar?
Definition ExprNode.h:296
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:556
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:686
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:279
void ranges(Block< TableExprRange > &)
Convert the tree to a number of range vectors which at least select the same things.
Definition ExprNode.h:553
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:265
Array< Float > getColumnFloat(const RowNumbers &rownrs) const
Definition ExprNode.h:683
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:406
TENShPtr newBitOr(const TENShPtr &right) const
MArray< DComplex > getDComplexAS(const TableExprId &id) const
Definition ExprNode.h:652
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:668
Array< MVTime > getArrayDate(const TableExprId &id) const
Definition ExprNode.h:640
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:284
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:397
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:1136
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:613
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:268
Array< uChar > getColumnuChar(const Vector< uInt > &rownrs) const
Definition ExprNode.h:388
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:649
Array< Int64 > getColumnInt64(const Vector< uInt > &rownrs) const
Definition ExprNode.h:403
Array< String > getColumnString(const RowNumbers &rownrs) const
Definition ExprNode.h:695
TableExprNode(const Array< Int64 > &value)
Array< Double > getArrayDouble(const TableExprId &id) const
Definition ExprNode.h:631
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:628
TENShPtr newPlus(const TENShPtr &right) const
Construct a new node for the given operation.
const TableExprNodeRep * getNodeRep() const
Definition ExprNode.h:701
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:662
TENShPtr newAND(const TENShPtr &right) const
Array< String > getArrayString(const TableExprId &id) const
Definition ExprNode.h:637
Array< uShort > getColumnuShort(const Vector< uInt > &rownrs) const
Definition ExprNode.h:394
Array< uInt > getColumnuInt(const Vector< uInt > &rownrs) const
Definition ExprNode.h:400
TableExprNode(TableExprNodeRep *rep)
Construct from a node representation.
Definition ExprNode.h:253
const TENShPtr & getRep() const
returns const pointer to the underlying TableExprNodeRep object.
Definition ExprNode.h:700
static TableExprNode newRandomNode(const TableExprInfo &)
Create rand() function node.
Array< uInt > getColumnuInt(const RowNumbers &rownrs) const
Definition ExprNode.h:677
TableExprNode(const Array< Short > &value)
TableExprNode(const MArray< Double > &value)
Array< Complex > getColumnComplex(const Vector< uInt > &rownrs) const
Definition ExprNode.h:412
TableExprNode(const Bool &value)
Constructors to convert a constant value to a TableExprNode.
String getString(const TableExprId &id) const
Definition ExprNode.h:622
DataType getColumnDataType() const
Get the data type for doing a getColumn on the expression.
Array< Bool > getArrayBool(const TableExprId &id) const
Definition ExprNode.h:625
TableExprNode(const char *)
TableExprNode(const uInt64 &value)
void show(ostream &) const
Show the tree.
Definition ExprNode.h:699
TableExprNode(const MArray< uShort > &value)
TableExprNode(const TaqlRegex &value)
MVTime getDate(const TableExprId &id) const
Definition ExprNode.h:621
void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
Definition ExprNode.h:272
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:618
TableExprNode(const Array< DComplex > &value)
TENShPtr setBinaryNodeInfo(TableExprNodeBinary *tsnptr, const TENShPtr &right=TENShPtr()) const
Put the new binary node object in a shared pointer.
bool operator==(const String &x, const String &y)
Global comparison operators.
Definition String.h:849
String operator+(const String &lhs, const String &rhs)
Global concatenation operators.
Definition String.h:816
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
TableExprNode runningAny(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1527
TableExprNode rmss(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1478
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:1305
TableExprNode sums(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
The partial version of the functions above.
Definition ExprNode.h:1451
TableExprNode maxs(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1463
TableExprNode medians(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1481
size_t nelements() const
The number of elements contained in this Block<T>.
Definition Block.h:565
TableExprNode boxedAny(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1558
TableExprNode boxedAll(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1561
TableExprNode sumSquares(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1457
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:1500
LatticeExprNode isNaN(const LatticeExprNode &expr)
Test if a value is a NaN.
TableExprNode runningMean(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1506
TableExprNode operator|(const TableExprNode &left, const TableExprNode &right)
Definition ExprNode.h:1109
TableExprNode substr(const TableExprNode &str, const TableExprNode &pos)
Definition ExprNode.h:1380
TableExprNode boxedVariance(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1542
TableExprNode angdist(const TableExprNode &pos1, const TableExprNode &pos2)
Angular distance between positions.
Definition ExprNode.h:1155
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:1161
LatticeExprNode asin(const LatticeExprNode &expr)
TableExprNode means(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1466
LatticeExprNode fmod(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode boxedAvdev(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1549
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:1311
LatticeExprNode mean(const LatticeExprNode &expr)
bool operator<(const String &x, const String &y)
Definition String.h:853
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:1400
String downcase(const std::string &str)
Global function which returns a transformation to lowercase of String.
LatticeExprNode cosh(const LatticeExprNode &expr)
LatticeExprNode atan(const LatticeExprNode &expr)
TableExprNode mjdtodate(const TableExprNode &node)
Definition ExprNode.h:1314
TableExprNode cmonth(const TableExprNode &node)
Definition ExprNode.h:1332
void set(const T &val)
Definition Block.h:541
TableExprNode operator&(const TableExprNode &left, const TableExprNode &right)
Definition ExprNode.h:1106
LatticeExprNode tanh(const LatticeExprNode &expr)
TableExprNode time(const TableExprNode &node)
Definition ExprNode.h:1368
LatticeExprNode sign(const LatticeExprNode &expr)
bool operator>=(const String &x, const String &y)
Definition String.h:852
LatticeExprNode arg(const LatticeExprNode &expr)
LatticeExprNode log10(const LatticeExprNode &expr)
TableExprNode cdow(const TableExprNode &node)
Definition ExprNode.h:1338
TableExprNode transpose(const TableExprNode &array)
Transpose all axes of a (masked) array.
Definition ExprNode.h:1579
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:1347
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:1148
T * array
The actual storage.
Definition Block.h:689
TableExprNode sumSquare(const TableExprNode &array)
Definition ExprNode.h:1415
unsigned int uInt
Definition aipstype.h:49
TableExprNode boxedRms(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1552
TableExprNode weekday(const TableExprNode &node)
Definition ExprNode.h:1335
LatticeExprNode stddev(const LatticeExprNode &expr)
TableExprNode isInf(const TableExprNode &node)
Definition ExprNode.h:1397
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:1275
T norm(const TableVector< T > &tv)
Definition TabVecMath.h:419
TableExprNode phase(const TableExprNode &node)
The phase (i.e.
Definition ExprNode.h:1281
TableExprNode boxedStddev(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1546
LatticeExprNode operator-(const LatticeExprNode &expr)
TableExprNode anys(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1488
TableExprNode isdefined(const TableExprNode &array)
Function operating on a field resulting in a bool scalar.
Definition ExprNode.h:1591
LatticeExprNode tan(const LatticeExprNode &expr)
TableExprNode day(const TableExprNode &node)
Definition ExprNode.h:1329
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:1164
TableExprNode nfalses(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1497
TableExprNode dms(const TableExprNode &node)
Definition ExprNode.h:1353
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:1158
LatticeExprNode sin(const LatticeExprNode &expr)
Numerical 1-argument functions.
LatticeExprNode operator/(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode ltrim(const TableExprNode &node)
Definition ExprNode.h:1374
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:1326
TableExprNode runningStddev(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1513
TableExprNode square(const TableExprNode &node)
Definition ExprNode.h:1206
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:1323
LatticeExprNode sqrt(const LatticeExprNode &expr)
IPosition shape(const RecordFieldId &) const
Get the actual shape of this field.
TableExprNode date(const TableExprNode &node)
Definition ExprNode.h:1320
TableExprNode rtrim(const TableExprNode &node)
Definition ExprNode.h:1377
float Float
Definition aipstype.h:52
TableExprNode runningAll(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1530
String name() const
Return the name of the field.
bool operator<=(const String &x, const String &y)
Definition String.h:854
TableExprNode arrayFlatten(const TableExprNode &array)
Flatten a masked array (get unmasked elements).
Definition ExprNode.h:1576
LatticeExprNode ntrue(const LatticeExprNode &expr)
TableExprNode findCone(const TableExprNode &sourcePos, const TableExprNode &cones)
The sourcePos can contain multiple sources.
Definition ExprNode.h:1167
T product(const TableVector< T > &tv)
Definition TabVecMath.h:380
TableExprNode cdate(const TableExprNode &node)
Definition ExprNode.h:1344
TableExprNode boxedMedian(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1555
String upcase(const std::string &str)
Global function which returns a transformation to uppercase of String.
TableExprNode fractiles(const TableExprNode &array, const TableExprNode &fraction, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1484
TableExprNode boolean(const TableExprNode &node)
Convert numeric or string value to bool (0, no, false, - means false).
Definition ExprNode.h:1269
TableExprNode stddevs(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1472
TableExprNode cube(const TableExprNode &node)
Definition ExprNode.h:1209
TableExprNode mjd(const TableExprNode &node)
Definition ExprNode.h:1317
LatticeExprNode avdev(const LatticeExprNode &expr)
std::shared_ptr< TableExprNodeRep > TENShPtr
Definition ExprNodeRep.h:56
TableExprNode sqlpattern(const TableExprNode &node)
Definition ExprNode.h:1308
LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode avdevs(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1475
String capitalize(const std::string &str)
Global function which returns a transformation to capitalization of String.
TableExprNode runningMax(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1503
TableExprNode products(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1454
TableExprNode integer(const TableExprNode &node)
Convert double, bool, or string to int (using floor).
Definition ExprNode.h:1266
LatticeExprNode log(const LatticeExprNode &expr)
String trim(const std::string &str)
Global function which removes leading and trailing whitespace.
TableExprNode boxedMean(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1539
LatticeExprNode iif(const LatticeExprNode &condition, const LatticeExprNode &arg1, const LatticeExprNode &arg2)
Function resembling the ternary ?
T & operator*()
Provide access to the field's value.
TableExprNode regex(const TableExprNode &node)
Functions for regular expression matching and pattern matching.
Definition ExprNode.h:1302
int Int
Definition aipstype.h:48
TableExprNode variances(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1469
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:1365
TableExprNode alls(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1491
TableExprNode boxedMin(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1533
TableExprNode marray(const TableExprNode &array, const TableExprNode &mask)
Form a masked array.
Definition ExprNode.h:1567
bool operator>(const String &x, const String &y)
Definition String.h:851
TableExprNode boxedMax(const TableExprNode &node, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1536
bool operator!=(const String &x, const String &y)
Definition String.h:850
TableExprNode ctodt(const TableExprNode &node)
Definition ExprNode.h:1341
TableExprNode ntrues(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1494
LatticeExprNode cos(const LatticeExprNode &expr)
LatticeExprNode floor(const LatticeExprNode &expr)
TableExprNode mins(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
Definition ExprNode.h:1460
NewDelAllocator< T > NewDelAllocator< T >::value
Definition Allocator.h:360
TableExprNode runningVariance(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1509
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:1587
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 round(const LatticeExprNode &expr)
LatticeExprNode ceil(const LatticeExprNode &expr)
LatticeExprNode real(const LatticeExprNode &expr)
LatticeExprNode operator||(const LatticeExprNode &left, const LatticeExprNode &right)
const T & get() const
TableExprNode runningRms(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1520
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:1356
TableExprNode strlength(const TableExprNode &node)
String functions on scalars or arrays.
Definition ExprNode.h:1290
TableExprNode runningMedian(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1523
TableExprNode hms(const TableExprNode &node)
Functions for angle-values.
Definition ExprNode.h:1350
unsigned long long uInt64
Definition aipsxtype.h:37
TableExprNode runningAvdev(const TableExprNode &array, const TableExprNodeSet &halfBoxWidth)
Definition ExprNode.h:1517
TableExprNode arrayData(const TableExprNode &array)
Get the data array of a masked array.
Definition ExprNode.h:1570
TableExprNode arrayMask(const TableExprNode &array)
Get the mask of a masked array.
Definition ExprNode.h:1573
std::string toString(const SubScanKey &subScanKey)
TableExprNode rms(const TableExprNode &array)
Definition ExprNode.h:1430