casacore
ExprNodeArray.h
Go to the documentation of this file.
1 //# ExprNodeArray.h: Classes representing an array in table select expression
2 //# Copyright (C) 1997,1999,2000,2001
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: aips2-request@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 //# $Id: ExprNodeArray.h 21262 2012-09-07 12:38:36Z gervandiepen $
27 
28 #ifndef TABLES_EXPRNODEARRAY_H
29 #define TABLES_EXPRNODEARRAY_H
30 
31 //# Includes
32 #include <casacore/tables/TaQL/ExprNodeRep.h>
33 #include <casacore/tables/TaQL/TaQLStyle.h>
34 #include <casacore/tables/Tables/Table.h>
35 #include <casacore/tables/Tables/ArrayColumn.h>
36 #include <casacore/casa/Arrays/Slicer.h>
37 
38 namespace casacore { //# NAMESPACE CASACORE - BEGIN
39 
40 //# Forward Declarations
41 class TableExprNodeSet;
42 
43 
44 // <summary>
45 // Base class for arrays in table select expression
46 // </summary>
47 
48 // <use visibility=local>
49 
50 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
51 // </reviewed>
52 
53 // <prerequisite>
54 //# Classes you should understand before using this one.
55 // <li> TableExprNode
56 // <li> TableExprNodeRep
57 // <li> TableExprNodeBinary
58 // </prerequisite>
59 
60 // <synopsis>
61 // This class is the base class to represent an array.
62 // The actual storing of the array column is done by its derivations.
63 // </synopsis>
64 
66 {
67 public:
68  // Create the object.
69  // <group>
73  // </group>
74 
76 
77  // Turn a constant array with one element into a scalar.
78  // It returns a zero pointer if not possible.
79  // The default implementation returns 0.
80  virtual TENShPtr makeConstantScalar();
81 
82  // Validate the given index against the array's shape.
83  // Treat a negative as an index from the end (a la python) and replace it.
84  IPosition validateIndex (const IPosition& index,
85  const ArrayBase& arr) const;
86 
87  // Get the shape of the array in the given row.
88  // This default implementation evaluates the value and returns its shape.
89  virtual const IPosition& getShape (const TableExprId& id);
90 
91  // The default implementation of getArrayDouble does
92  // getArrayInt and converts the result.
93  virtual MArray<Double> getArrayDouble (const TableExprId& id);
94 
95  // The default implementation of getArrayDComplex does
96  // getArrayDouble and converts the result.
97  virtual MArray<DComplex> getArrayDComplex (const TableExprId& id);
98 
99  // Does a value occur in the set?
100  // <group>
101  virtual Bool hasBool (const TableExprId& id, Bool value);
102  virtual Bool hasInt (const TableExprId& id, Int64 value);
103  virtual Bool hasDouble (const TableExprId& id, Double value);
104  virtual Bool hasDComplex (const TableExprId& id, const DComplex& value);
105  virtual Bool hasString (const TableExprId& id, const String& value);
106  virtual Bool hasDate (const TableExprId& id, const MVTime& value);
107  virtual MArray<Bool> hasArrayBool (const TableExprId& id,
108  const MArray<Bool>& value);
109  virtual MArray<Bool> hasArrayInt (const TableExprId& id,
110  const MArray<Int64>& value);
111  virtual MArray<Bool> hasArrayDouble (const TableExprId& id,
112  const MArray<Double>& value);
113  virtual MArray<Bool> hasArrayDComplex (const TableExprId& id,
114  const MArray<DComplex>& value);
115  virtual MArray<Bool> hasArrayString (const TableExprId& id,
116  const MArray<String>& value);
117  virtual MArray<Bool> hasArrayDate (const TableExprId& id,
118  const MArray<MVTime>& value);
119  // </group>
120 
121  // Get a single element from the array in the given row.
122  // <group>
123  virtual Bool getElemBool (const TableExprId& id,
124  const Slicer& index);
125  virtual Int64 getElemInt (const TableExprId& id,
126  const Slicer& index);
127  virtual Double getElemDouble (const TableExprId& id,
128  const Slicer& index);
129  virtual DComplex getElemDComplex (const TableExprId& id,
130  const Slicer& index);
131  virtual String getElemString (const TableExprId& id,
132  const Slicer& index);
133  virtual MVTime getElemDate (const TableExprId& id,
134  const Slicer& index);
135  // </group>
136 
137  // Get a slice of the array in the given row.
138  // <group>
139  virtual MArray<Bool> getSliceBool (const TableExprId& id,
140  const Slicer&);
141  virtual MArray<Int64> getSliceInt (const TableExprId& id,
142  const Slicer&);
143  virtual MArray<Double> getSliceDouble (const TableExprId& id,
144  const Slicer&);
145  virtual MArray<DComplex> getSliceDComplex (const TableExprId& id,
146  const Slicer&);
147  virtual MArray<String> getSliceString (const TableExprId& id,
148  const Slicer&);
149  virtual MArray<MVTime> getSliceDate (const TableExprId& id,
150  const Slicer&);
151  // </group>
152 
153  // Get a single element for the entire column (used by sort).
154  // <group>
155  virtual Array<Bool> getElemColumnBool (const Vector<uInt>& rownrs,
156  const Slicer&);
157  virtual Array<uChar> getElemColumnuChar (const Vector<uInt>& rownrs,
158  const Slicer&);
159  virtual Array<Short> getElemColumnShort (const Vector<uInt>& rownrs,
160  const Slicer&);
161  virtual Array<uShort> getElemColumnuShort (const Vector<uInt>& rownrs,
162  const Slicer&);
163  virtual Array<Int> getElemColumnInt (const Vector<uInt>& rownrs,
164  const Slicer&);
165  virtual Array<uInt> getElemColumnuInt (const Vector<uInt>& rownrs,
166  const Slicer&);
167  virtual Array<Int64> getElemColumnInt64 (const Vector<uInt>& rownrs,
168  const Slicer&);
169  virtual Array<Float> getElemColumnFloat (const Vector<uInt>& rownrs,
170  const Slicer&);
171  virtual Array<Double> getElemColumnDouble (const Vector<uInt>& rownrs,
172  const Slicer&);
173  virtual Array<Complex> getElemColumnComplex (const Vector<uInt>& rownrs,
174  const Slicer&);
175  virtual Array<DComplex> getElemColumnDComplex (const Vector<uInt>& rownrs,
176  const Slicer&);
177  virtual Array<String> getElemColumnString (const Vector<uInt>& rownrs,
178  const Slicer&);
179  // </group>
180 
181  // Make an array with the given shape and fill it with the value.
184  static MArray<DComplex> makeArray (const IPosition& shape,
185  const DComplex& value);
186 
187 protected:
189 };
190 
191 
192 
193 // <summary>
194 // Base class for Array column in table select expression
195 // </summary>
196 
197 // <use visibility=local>
198 
199 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
200 // </reviewed>
201 
202 // <prerequisite>
203 //# Classes you should understand before using this one.
204 // <li> TableExprNodeArray
205 // </prerequisite>
206 
207 // <synopsis>
208 // This class is the base class to store an array column.
209 // The actual storing of the array column is done by its derivations.
210 // </synopsis>
211 
213 {
214 public:
215  // Create the object for the given column and table.
216  TableExprNodeArrayColumn (const TableColumn& tablecol,
217  const Table& table);
218 
220 
221  // This node represents a table column.
222  virtual void getColumnNodes (std::vector<TableExprNodeRep*>& cols);
223 
224  // Do not apply the selection.
225  virtual void disableApplySelection();
226 
227  // Re-create the column object for a selection of rows.
228  virtual void applySelection (const Vector<uInt>& rownrs);
229 
230  // Get the TableColumn object.
231  const TableColumn& getColumn() const;
232 
233  // Get the shape of the array in the given row.
234  virtual const IPosition& getShape (const TableExprId& id);
235 
236  // Is the value in the given row defined?
237  virtual Bool isDefined (const TableExprId& id);
238 
239  // Get the data type of this column.
240  // It returns with a True status.
241  virtual Bool getColumnDataType (DataType&) const;
242 
243 protected:
247 };
248 
249 
250 
251 // <summary>
252 // Bool array column in table select expression
253 // </summary>
254 
255 // <use visibility=local>
256 
257 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
258 // </reviewed>
259 
260 // <prerequisite>
261 //# Classes you should understand before using this one.
262 // <li> TableExprNodeArrayColumn
263 // </prerequisite>
264 
265 // <synopsis>
266 // These classes store an array column of type X.
267 // </synopsis>
268 
270 {
271 public:
273  const Table&);
275 
276  // Re-create the column object for a selection of rows.
277  virtual void applySelection (const Vector<uInt>& rownrs);
278 
279  virtual Bool getElemBool (const TableExprId& id, const Slicer& index);
280  virtual MArray<Bool> getArrayBool (const TableExprId& id);
281  virtual MArray<Bool> getSliceBool (const TableExprId& id, const Slicer&);
282  virtual Array<Bool> getElemColumnBool (const Vector<uInt>& rownrs,
283  const Slicer&);
284 protected:
286 };
287 
288 
289 // <summary>
290 // uChar array column in table select expression
291 // </summary>
292 
293 // <use visibility=local>
294 
295 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
296 // </reviewed>
297 
298 // <prerequisite>
299 //# Classes you should understand before using this one.
300 // <li> TableExprNodeArrayColumn
301 // </prerequisite>
302 
303 // <synopsis>
304 // These classes store an array column of type X.
305 // </synopsis>
306 
308 {
309 public:
311  const Table&);
313 
314  // Re-create the column object for a selection of rows.
315  virtual void applySelection (const Vector<uInt>& rownrs);
316 
317  virtual Int64 getElemInt (const TableExprId& id, const Slicer& index);
318  virtual MArray<Int64> getArrayInt (const TableExprId& id);
319  virtual MArray<Int64> getSliceInt (const TableExprId& id,
320  const Slicer&);
321  virtual Array<uChar> getElemColumnuChar (const Vector<uInt>& rownrs,
322  const Slicer&);
323 protected:
325 };
326 
327 
328 // <summary>
329 // Short array column in table select expression
330 // </summary>
331 
332 // <use visibility=local>
333 
334 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
335 // </reviewed>
336 
337 // <prerequisite>
338 //# Classes you should understand before using this one.
339 // <li> TableExprNodeArrayColumn
340 // </prerequisite>
341 
342 // <synopsis>
343 // These classes store an array column of type X.
344 // </synopsis>
345 
347 {
348 public:
350  const Table&);
352 
353  // Re-create the column object for a selection of rows.
354  virtual void applySelection (const Vector<uInt>& rownrs);
355 
356  virtual Int64 getElemInt (const TableExprId& id, const Slicer& index);
357  virtual MArray<Int64> getArrayInt (const TableExprId& id);
358  virtual MArray<Int64> getSliceInt (const TableExprId& id,
359  const Slicer&);
360  virtual Array<Short> getElemColumnShort (const Vector<uInt>& rownrs,
361  const Slicer&);
362 protected:
364 };
365 
366 
367 // <summary>
368 // uShort array column in table select expression
369 // </summary>
370 
371 // <use visibility=local>
372 
373 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
374 // </reviewed>
375 
376 // <prerequisite>
377 //# Classes you should understand before using this one.
378 // <li> TableExprNodeArrayColumn
379 // </prerequisite>
380 
381 // <synopsis>
382 // These classes store an array column of type X.
383 // </synopsis>
384 
386 {
387 public:
389  const Table&);
391 
392  // Re-create the column object for a selection of rows.
393  virtual void applySelection (const Vector<uInt>& rownrs);
394 
395  virtual Int64 getElemInt (const TableExprId& id, const Slicer& index);
396  virtual MArray<Int64> getArrayInt (const TableExprId& id);
397  virtual MArray<Int64> getSliceInt (const TableExprId& id,
398  const Slicer&);
399  virtual Array<uShort> getElemColumnuShort (const Vector<uInt>& rownrs,
400  const Slicer&);
401 protected:
403 };
404 
405 
406 // <summary>
407 // Int array column in table select expression
408 // </summary>
409 
410 // <use visibility=local>
411 
412 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
413 // </reviewed>
414 
415 // <prerequisite>
416 //# Classes you should understand before using this one.
417 // <li> TableExprNodeArrayColumn
418 // </prerequisite>
419 
420 // <synopsis>
421 // These classes store an array column of type X.
422 // </synopsis>
423 
425 {
426 public:
428  const Table&);
430 
431  // Re-create the column object for a selection of rows.
432  virtual void applySelection (const Vector<uInt>& rownrs);
433 
434  virtual Int64 getElemInt (const TableExprId& id, const Slicer& index);
435  virtual MArray<Int64> getArrayInt (const TableExprId& id);
436  virtual MArray<Int64> getSliceInt (const TableExprId& id,
437  const Slicer&);
438  virtual Array<Int> getElemColumnInt (const Vector<uInt>& rownrs,
439  const Slicer&);
440 protected:
442 };
443 
444 
445 // <summary>
446 // uInt array column in table select expression
447 // </summary>
448 
449 // <use visibility=local>
450 
451 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
452 // </reviewed>
453 
454 // <prerequisite>
455 //# Classes you should understand before using this one.
456 // <li> TableExprNodeArrayColumn
457 // </prerequisite>
458 
459 // <synopsis>
460 // These classes store an array column of type X.
461 // </synopsis>
462 
464 {
465 public:
467  const Table&);
469 
470  // Re-create the column object for a selection of rows.
471  virtual void applySelection (const Vector<uInt>& rownrs);
472 
473  virtual Int64 getElemInt (const TableExprId& id, const Slicer& index);
474  virtual MArray<Int64> getArrayInt (const TableExprId& id);
475  virtual MArray<Int64> getSliceInt (const TableExprId& id,
476  const Slicer&);
477  virtual Array<uInt> getElemColumnuInt (const Vector<uInt>& rownrs,
478  const Slicer&);
479 protected:
481 };
482 
483 
484 // <summary>
485 // Int64 array column in table select expression
486 // </summary>
487 
488 // <use visibility=local>
489 
490 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
491 // </reviewed>
492 
493 // <prerequisite>
494 //# Classes you should understand before using this one.
495 // <li> TableExprNodeArrayColumn
496 // </prerequisite>
497 
498 // <synopsis>
499 // These classes store an array column of type X.
500 // </synopsis>
501 
503 {
504 public:
506  const Table&);
508 
509  // Re-create the column object for a selection of rows.
510  virtual void applySelection (const Vector<uInt>& rownrs);
511 
512  virtual Int64 getElemInt (const TableExprId& id, const Slicer& index);
513  virtual MArray<Int64> getArrayInt (const TableExprId& id);
514  virtual MArray<Int64> getSliceInt (const TableExprId& id,
515  const Slicer&);
516  virtual Array<Int64> getElemColumnInt64 (const Vector<uInt>& rownrs,
517  const Slicer&);
518 protected:
520 };
521 
522 
523 // <summary>
524 // Float array column in table select expression
525 // </summary>
526 
527 // <use visibility=local>
528 
529 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
530 // </reviewed>
531 
532 // <prerequisite>
533 //# Classes you should understand before using this one.
534 // <li> TableExprNodeArrayColumn
535 // </prerequisite>
536 
537 // <synopsis>
538 // These classes store an array column of type X.
539 // </synopsis>
540 
542 {
543 public:
545  const Table&);
547 
548  // Re-create the column object for a selection of rows.
549  virtual void applySelection (const Vector<uInt>& rownrs);
550 
551  virtual Double getElemDouble (const TableExprId& id, const Slicer& index);
552  virtual MArray<Double> getArrayDouble (const TableExprId& id);
553  virtual MArray<Double> getSliceDouble (const TableExprId& id,
554  const Slicer&);
555  virtual Array<Float> getElemColumnFloat (const Vector<uInt>& rownrs,
556  const Slicer&);
557 protected:
559 };
560 
561 
562 // <summary>
563 // Double array column in table select expression
564 // </summary>
565 
566 // <use visibility=local>
567 
568 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
569 // </reviewed>
570 
571 // <prerequisite>
572 //# Classes you should understand before using this one.
573 // <li> TableExprNodeArrayColumn
574 // </prerequisite>
575 
576 // <synopsis>
577 // These classes store an array column of type X.
578 // </synopsis>
579 
581 {
582 public:
584  const Table&);
586 
587  // Re-create the column object for a selection of rows.
588  virtual void applySelection (const Vector<uInt>& rownrs);
589 
590  virtual Double getElemDouble (const TableExprId& id, const Slicer& index);
591  virtual MArray<Double> getArrayDouble (const TableExprId& id);
592  virtual MArray<Double> getSliceDouble (const TableExprId& id,
593  const Slicer&);
594  virtual Array<Double> getElemColumnDouble (const Vector<uInt>& rownrs,
595  const Slicer&);
596 protected:
598 };
599 
600 
601 // <summary>
602 // Complex array column in table select expression
603 // </summary>
604 
605 // <use visibility=local>
606 
607 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
608 // </reviewed>
609 
610 // <prerequisite>
611 //# Classes you should understand before using this one.
612 // <li> TableExprNodeArrayColumn
613 // </prerequisite>
614 
615 // <synopsis>
616 // These classes store an array column of type X.
617 // </synopsis>
618 
620 {
621 public:
623  const Table&);
625 
626  // Re-create the column object for a selection of rows.
627  virtual void applySelection (const Vector<uInt>& rownrs);
628 
629  virtual DComplex getElemDComplex (const TableExprId& id, const Slicer& index);
630  virtual MArray<DComplex> getArrayDComplex (const TableExprId& id);
631  virtual MArray<DComplex> getSliceDComplex (const TableExprId& id,
632  const Slicer&);
633  virtual Array<Complex> getElemColumnComplex (const Vector<uInt>& rownrs,
634  const Slicer&);
635 protected:
637 };
638 
639 
640 // <summary>
641 // DComplex array column in table select expression
642 // </summary>
643 
644 // <use visibility=local>
645 
646 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
647 // </reviewed>
648 
649 // <prerequisite>
650 //# Classes you should understand before using this one.
651 // <li> TableExprNodeArrayColumn
652 // </prerequisite>
653 
654 // <synopsis>
655 // These classes store an array column of type X.
656 // </synopsis>
657 
659 {
660 public:
662  const Table&);
664 
665  // Re-create the column object for a selection of rows.
666  virtual void applySelection (const Vector<uInt>& rownrs);
667 
668  virtual DComplex getElemDComplex (const TableExprId& id, const Slicer& index);
669  virtual MArray<DComplex> getArrayDComplex (const TableExprId& id);
670  virtual MArray<DComplex> getSliceDComplex (const TableExprId& id,
671  const Slicer&);
672  virtual Array<DComplex> getElemColumnDComplex (const Vector<uInt>& rownrs,
673  const Slicer&);
674 protected:
676 };
677 
678 
679 // <summary>
680 // String array column in table select expression
681 // </summary>
682 
683 // <use visibility=local>
684 
685 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
686 // </reviewed>
687 
688 // <prerequisite>
689 //# Classes you should understand before using this one.
690 // <li> TableExprNodeArrayColumn
691 // </prerequisite>
692 
693 // <synopsis>
694 // These classes store an array column of type X.
695 // </synopsis>
696 
698 {
699 public:
701  const Table&);
703 
704  // Re-create the column object for a selection of rows.
705  virtual void applySelection (const Vector<uInt>& rownrs);
706 
707  virtual String getElemString (const TableExprId& id, const Slicer& index);
708  virtual MArray<String> getArrayString (const TableExprId& id);
709  virtual MArray<String> getSliceString (const TableExprId& id,
710  const Slicer&);
711  virtual Array<String> getElemColumnString (const Vector<uInt>& rownrs,
712  const Slicer&);
713 protected:
715 };
716 
717 
718 
719 
720 // <summary>
721 // The index of an array element in a table select expression
722 // </summary>
723 
724 // <use visibility=local>
725 
726 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
727 // </reviewed>
728 
729 // <prerequisite>
730 //# Classes you should understand before using this one.
731 // <li> TableExprNodeMulti
732 // </prerequisite>
733 
734 // <etymology>
735 // TableExprNodeIndex is used to store an index.
736 // All the operands must be Int.
737 // </etymology>
738 
739 // <synopsis>
740 // TableExprNodeIndex is a derivation of TableExprNodeMulti
741 // expression tree that represents an index.
742 // </synopsis>
743 
744 // <motivation>
745 // All operands of TableExprNodeIndex must be Int,
746 // therefore it is a derivation of TableExprNodeMulti.
747 // </motivation>
748 
749 // <todo asof="$DATE:$">
750 //# A List of bugs, limitations, extensions or planned refinements.
751 // <li> to be filled in
752 // </todo>
753 
755 {
756 public:
757  // Constructor
758  explicit TableExprNodeIndex (const TableExprNodeSet& indices,
759  const TaQLStyle& = TaQLStyle(0));
760 
761  // Destructor
762  virtual ~TableExprNodeIndex();
763 
764  // Link all the operands and check datatype.
765  // Calculate the IPosition values for the const operands.
766  void fillIndex (const TableExprNodeSet& indices);
767 
768  // Check if the index values match the dimensionality and shape
769  // of fixed-shaped array.
770  void checkIndexValues (const TENShPtr& arrayNode);
771 
772  // Get the Slicer value for a constant index.
773  const Slicer& getConstantSlicer() const;
774 
775  // Get the Slicer value for the slice.
776  const Slicer& getSlicer (const TableExprId& id);
777 
778  // Does it index a single element?
779  Bool isSingle() const;
780 
781 protected:
782  Int origin_p; //# origin 0 for C++/Python; 1 for Glish
783  Int endMinus_p; //# subtract from end (origin and endExcl)
784  Bool isCOrder_p; //# True for Python
785  IPosition start_p; //# precalculated start values
786  IPosition end_p; //# precalculated end values (<0 = till end)
787  IPosition incr_p; //# precalculated increment values
788  Slicer slicer_p; //# combined start, end, and incr
789  Block<Bool> varIndex_p; //# is the start for the axes variable?
790  Bool isSingle_p; //# Index a single value?
791 
792  // Precalculate the constant indices and store them.
793  void convertConstIndex();
794 
795  // Fill the slicer for this row.
796  void fillSlicer (const TableExprId& id);
797 
798  // Get the shape of the node involved. Reverse axes if needed.
799  IPosition getNodeShape (const TENShPtr& arrayNode) const;
800 };
801 
802 
803 
804 
805 // <summary>
806 // Array column part in table select expression
807 // </summary>
808 
809 // <use visibility=local>
810 
811 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
812 // </reviewed>
813 
814 // <prerequisite>
815 //# Classes you should understand before using this one.
816 // <li> TableExprNode
817 // <li> TableExprNodeRep
818 // <li> TableExprNodeBinary
819 // </prerequisite>
820 
821 // <synopsis>
822 // This class handles a part of an array.
823 // It uses a TableExprNodeArray to handle the array
824 // and a TableExprNodeIndex to store the index.
825 // </synopsis>
826 
828 {
829 public:
830  TableExprNodeArrayPart (const TENShPtr& arrayNode,
831  const TENShPtr& indexNode);
833 
834  // Show the node.
835  virtual void show (ostream& os, uInt indent) const;
836 
837  virtual Bool getBool (const TableExprId& id);
838  virtual Int64 getInt (const TableExprId& id);
839  virtual Double getDouble (const TableExprId& id);
840  virtual DComplex getDComplex (const TableExprId& id);
841  virtual String getString (const TableExprId& id);
842  virtual MVTime getDate (const TableExprId& id);
843 
844  virtual MArray<Bool> getArrayBool (const TableExprId& id);
845  virtual MArray<Int64> getArrayInt (const TableExprId& id);
846  virtual MArray<Double> getArrayDouble (const TableExprId& id);
847  virtual MArray<DComplex> getArrayDComplex (const TableExprId& id);
848  virtual MArray<String> getArrayString (const TableExprId& id);
849  virtual MArray<MVTime> getArrayDate (const TableExprId& id);
850 
851  // Get the data type of this column (if possible).
852  // It returns with a False status when the index is not constant
853  // (that means that the index can vary with row number).
854  virtual Bool getColumnDataType (DataType&) const;
855 
856  virtual Array<Bool> getColumnBool (const Vector<uInt>& rownrs);
857  virtual Array<uChar> getColumnuChar (const Vector<uInt>& rownrs);
858  virtual Array<Short> getColumnShort (const Vector<uInt>& rownrs);
859  virtual Array<uShort> getColumnuShort (const Vector<uInt>& rownrs);
860  virtual Array<Int> getColumnInt (const Vector<uInt>& rownrs);
861  virtual Array<uInt> getColumnuInt (const Vector<uInt>& rownrs);
862  virtual Array<Int64> getColumnInt64 (const Vector<uInt>& rownrs);
863  virtual Array<Float> getColumnFloat (const Vector<uInt>& rownrs);
864  virtual Array<Double> getColumnDouble (const Vector<uInt>& rownrs);
865  virtual Array<Complex> getColumnComplex (const Vector<uInt>& rownrs);
866  virtual Array<DComplex> getColumnDComplex (const Vector<uInt>& rownrs);
867  virtual Array<String> getColumnString (const Vector<uInt>& rownrs);
868 
869  // Get the index node.
870  const TableExprNodeIndex* getIndexNode() const;
871 
872  // Get the array column node.
873  // It returns 0 if the parent object is no array column.
875 
876 private:
879  TableExprNodeArrayColumn* colNode_p; //# 0 if arrNode is no arraycolumn
880 };
881 
882 
883 
884 
886 {
887  return isSingle_p;
888 }
890 {
891  return slicer_p;
892 }
894 {
895  if (!isConstant()) {
896  fillSlicer (id);
897  }
898  return slicer_p;
899 }
900 
902 {
903  return tabCol_p;
904 }
905 
907 {
908  return inxNode_p;
909 }
910 
911 inline const TableExprNodeArrayColumn*
913 {
914  return colNode_p;
915 }
916 
917 
918 
919 } //# NAMESPACE CASACORE - END
920 
921 #endif
922 
casacore::TableExprNodeArrayColumnDouble::getElemDouble
virtual Double getElemDouble(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArray::validateIndex
IPosition validateIndex(const IPosition &index, const ArrayBase &arr) const
Validate the given index against the array's shape.
casacore::Slicer
Specify which elements to extract from an n-dimensional array.
Definition: Slicer.h:289
casacore::TableExprNodeArrayColumnuChar::getArrayInt
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
casacore::TableExprNodeArrayColumnuShort::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayPart::getColumnBool
virtual Array< Bool > getColumnBool(const Vector< uInt > &rownrs)
Get the value of the expression evaluated for the entire column.
casacore::TableExprNodeArrayColumnInt::getArrayInt
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
casacore::TableExprNodeIndex
The index of an array element in a table select expression.
Definition: ExprNodeArray.h:754
casacore::TableExprNodeArrayColumnShort::col_p
ArrayColumn< Short > col_p
Definition: ExprNodeArray.h:363
casacore::TableExprNodeArray::getSliceString
virtual MArray< String > getSliceString(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnComplex::~TableExprNodeArrayColumnComplex
~TableExprNodeArrayColumnComplex()
casacore::TableExprNodeArrayColumnDComplex::getArrayDComplex
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result.
casacore::IPosition
A Vector of integers, for indexing into Array<T> objects.
Definition: IPosition.h:119
casacore::TableExprNodeArrayPart::getColumnFloat
virtual Array< Float > getColumnFloat(const Vector< uInt > &rownrs)
casacore::TableExprNodeArrayColumnString::getArrayString
virtual MArray< String > getArrayString(const TableExprId &id)
casacore::TableExprNodeArrayColumnuChar::TableExprNodeArrayColumnuChar
TableExprNodeArrayColumnuChar(const TableColumn &, const Table &)
casacore::TableExprNodeArrayColumnShort::getSliceInt
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnuChar::getElemInt
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArray::getElemColumnBool
virtual Array< Bool > getElemColumnBool(const Vector< uInt > &rownrs, const Slicer &)
Get a single element for the entire column (used by sort).
casacore::TableExprNodeArrayColumnuInt::getSliceInt
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
casacore::TableExprNodeIndex::getConstantSlicer
const Slicer & getConstantSlicer() const
Get the Slicer value for a constant index.
Definition: ExprNodeArray.h:889
casacore::TableExprNodeArrayPart::getColumnComplex
virtual Array< Complex > getColumnComplex(const Vector< uInt > &rownrs)
casacore::TableExprNodeArrayColumn::tabCol_p
TableColumn tabCol_p
Definition: ExprNodeArray.h:245
casacore::TableExprNodeArrayColumnBool::getSliceBool
virtual MArray< Bool > getSliceBool(const TableExprId &id, const Slicer &)
Get a slice of the array in the given row.
casacore::TableColumn
Read/write access to a table column.
Definition: TableColumn.h:98
casacore::TableExprNodeArrayColumnComplex::TableExprNodeArrayColumnComplex
TableExprNodeArrayColumnComplex(const TableColumn &, const Table &)
casacore::TableExprNodeArrayColumnDouble::getElemColumnDouble
virtual Array< Double > getElemColumnDouble(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayPart::getInt
virtual Int64 getInt(const TableExprId &id)
casacore::TableExprNodeRep::table
Table & table()
Get table.
Definition: ExprNodeRep.h:749
casacore::TableExprNodeArrayColumnuShort::getArrayInt
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
Complexfwd_global_functions_Complexfwd::casacore::DComplex
std::complex< Double > DComplex
Definition: Complexfwd.h:50
casacore::MVTime
Class to handle date/time type conversions and I/O.
Definition: MVTime.h:269
casacore::TableExprNodeArray::getElemColumnuShort
virtual Array< uShort > getElemColumnuShort(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeIndex::end_p
IPosition end_p
Definition: ExprNodeArray.h:786
casacore::TableExprNodeIndex::~TableExprNodeIndex
virtual ~TableExprNodeIndex()
Destructor.
casacore::TableExprNodeArrayColumnInt::getElemInt
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeIndex::start_p
IPosition start_p
Definition: ExprNodeArray.h:785
casacore::TableExprNodeArrayColumn
Base class for Array column in table select expression.
Definition: ExprNodeArray.h:212
casacore::TableExprNodeArrayColumnuInt::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::CountedPtr< TableExprNodeRep >
casacore::TableExprNodeArrayColumnBool::getElemBool
virtual Bool getElemBool(const TableExprId &id, const Slicer &index)
Get a single element from the array in the given row.
casacore::TableExprNodeArrayColumnuShort::TableExprNodeArrayColumnuShort
TableExprNodeArrayColumnuShort(const TableColumn &, const Table &)
casacore::TableExprNodeArray::getShape
virtual const IPosition & getShape(const TableExprId &id)
Get the shape of the array in the given row.
casacore::TableExprNodeArrayColumn::selTable_p
Table selTable_p
Definition: ExprNodeArray.h:244
casacore::TableExprNodeArray::hasInt
virtual Bool hasInt(const TableExprId &id, Int64 value)
casacore::TableExprNodeArrayColumnDComplex::getElemDComplex
virtual DComplex getElemDComplex(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArrayPart::getArrayDouble
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
casacore::TableExprNodeArray::getArrayDComplex
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result.
casacore::TableExprNodeArray::getElemColumnInt
virtual Array< Int > getElemColumnInt(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumnuShort::getElemInt
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
casacore::ArrayBase
Non-templated base class for templated Array class.
Definition: ArrayBase.h:74
casacore::TableExprNodeArrayPart::~TableExprNodeArrayPart
~TableExprNodeArrayPart()
casacore::TableExprNodeArray::makeArray
static MArray< Int64 > makeArray(const IPosition &shape, Int64 value)
Make an array with the given shape and fill it with the value.
casacore::TableExprNodeIndex::origin_p
Int origin_p
Definition: ExprNodeArray.h:782
casacore::TableExprNodeArray::getElemColumnDComplex
virtual Array< DComplex > getElemColumnDComplex(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumnDouble::getSliceDouble
virtual MArray< Double > getSliceDouble(const TableExprId &id, const Slicer &)
casacore::TableExprNodeIndex::slicer_p
Slicer slicer_p
Definition: ExprNodeArray.h:788
casacore::TableExprNodeArrayPart
Array column part in table select expression.
Definition: ExprNodeArray.h:827
casacore::TableExprNodeIndex::convertConstIndex
void convertConstIndex()
Precalculate the constant indices and store them.
casacore::TableExprNodeArray::getElemColumnuChar
virtual Array< uChar > getElemColumnuChar(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArray::TableExprNodeArray
TableExprNodeArray(NodeDataType, OperType)
Create the object.
casacore::TableExprNodeArrayColumnDComplex::TableExprNodeArrayColumnDComplex
TableExprNodeArrayColumnDComplex(const TableColumn &, const Table &)
casacore::TableExprNodeArrayPart::show
virtual void show(ostream &os, uInt indent) const
Show the node.
casacore::TableExprNodeArrayColumnDComplex::getElemColumnDComplex
virtual Array< DComplex > getElemColumnDComplex(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumn::applySelection_p
Bool applySelection_p
Definition: ExprNodeArray.h:246
casacore::TableExprNodeArray::hasArrayInt
virtual MArray< Bool > hasArrayInt(const TableExprId &id, const MArray< Int64 > &value)
casacore::TableExprNodeArrayPart::getString
virtual String getString(const TableExprId &id)
casacore::TableExprNodeArray::getSliceBool
virtual MArray< Bool > getSliceBool(const TableExprId &id, const Slicer &)
Get a slice of the array in the given row.
casacore::TableExprNodeArrayColumnuChar::getElemColumnuChar
virtual Array< uChar > getElemColumnuChar(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumnFloat::col_p
ArrayColumn< Float > col_p
Definition: ExprNodeArray.h:558
casacore::TableExprNodeArrayColumnInt::getSliceInt
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayPart::getColumnDouble
virtual Array< Double > getColumnDouble(const Vector< uInt > &rownrs)
casacore::ArrayColumn< Bool >
casacore::TableExprNodeArrayPart::getColumnuShort
virtual Array< uShort > getColumnuShort(const Vector< uInt > &rownrs)
casacore::TableExprNodeArrayColumn::TableExprNodeArrayColumn
TableExprNodeArrayColumn(const TableColumn &tablecol, const Table &table)
Create the object for the given column and table.
casacore::TableExprNodeArrayColumnShort::getArrayInt
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
casacore::TableExprNodeArrayColumnBool::~TableExprNodeArrayColumnBool
~TableExprNodeArrayColumnBool()
casacore::TableExprNodeArrayColumnInt::TableExprNodeArrayColumnInt
TableExprNodeArrayColumnInt(const TableColumn &, const Table &)
casacore::TableExprNodeArray::getElemColumnComplex
virtual Array< Complex > getElemColumnComplex(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayPart::getDate
virtual MVTime getDate(const TableExprId &id)
casacore::TableExprNodeRep::OperType
OperType
Define the operator types.
Definition: ExprNodeRep.h:187
casacore::TableExprNodeArray::hasArrayDComplex
virtual MArray< Bool > hasArrayDComplex(const TableExprId &id, const MArray< DComplex > &value)
casacore::TableExprNodeArray::hasArrayDate
virtual MArray< Bool > hasArrayDate(const TableExprId &id, const MArray< MVTime > &value)
casacore::TableExprNodeRep::isConstant
Bool isConstant() const
Is the expression a constant?
Definition: ExprNodeRep.h:727
casacore::TableExprNodeArrayColumnShort::TableExprNodeArrayColumnShort
TableExprNodeArrayColumnShort(const TableColumn &, const Table &)
casacore::TableExprNodeArrayPart::arrNode_p
TableExprNodeArray * arrNode_p
Definition: ExprNodeArray.h:878
casacore::TableExprNodeArrayColumnInt64::TableExprNodeArrayColumnInt64
TableExprNodeArrayColumnInt64(const TableColumn &, const Table &)
casacore::TableExprNodeArrayColumnComplex::getElemDComplex
virtual DComplex getElemDComplex(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArrayPart::colNode_p
TableExprNodeArrayColumn * colNode_p
Definition: ExprNodeArray.h:879
casacore::TableExprNodeArrayColumnDComplex::getSliceDComplex
virtual MArray< DComplex > getSliceDComplex(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnInt64::getElemInt
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArrayColumnComplex::getArrayDComplex
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result.
casacore::TableExprNodeArrayPart::getArrayString
virtual MArray< String > getArrayString(const TableExprId &id)
casacore::TableExprNodeArrayPart::getColumnInt
virtual Array< Int > getColumnInt(const Vector< uInt > &rownrs)
casacore::TableExprNodeIndex::TableExprNodeIndex
TableExprNodeIndex(const TableExprNodeSet &indices, const TaQLStyle &=TaQLStyle(0))
Constructor.
casacore::TableExprNodeArrayColumnuShort::getElemColumnuShort
virtual Array< uShort > getElemColumnuShort(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayPart::getDouble
virtual Double getDouble(const TableExprId &id)
casacore::TableExprNodeArrayColumnuShort::col_p
ArrayColumn< uShort > col_p
Definition: ExprNodeArray.h:402
casacore::TableExprNodeArrayPart::getDComplex
virtual DComplex getDComplex(const TableExprId &id)
casacore::TableExprNodeArrayColumnDouble::getArrayDouble
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
casacore::Table
Main interface class to a read/write table.
Definition: Table.h:153
casacore::TableExprNodeArrayColumnuInt::col_p
ArrayColumn< uInt > col_p
Definition: ExprNodeArray.h:480
casacore::TableExprNodeArrayColumnFloat::getElemColumnFloat
virtual Array< Float > getElemColumnFloat(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumn::getColumnNodes
virtual void getColumnNodes(std::vector< TableExprNodeRep * > &cols)
This node represents a table column.
casacore::TableExprNodeIndex::isCOrder_p
Bool isCOrder_p
Definition: ExprNodeArray.h:784
casacore::value
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
casacore::TableExprNodeArrayColumnFloat
Float array column in table select expression.
Definition: ExprNodeArray.h:541
casacore::TableExprNodeArrayColumnBool::col_p
ArrayColumn< Bool > col_p
Definition: ExprNodeArray.h:285
casacore::Double
double Double
Definition: aipstype.h:55
casacore::TableExprNodeArrayColumnFloat::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayColumnString::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayColumn::disableApplySelection
virtual void disableApplySelection()
Do not apply the selection.
casacore::TableExprNodeArrayColumnComplex
Complex array column in table select expression.
Definition: ExprNodeArray.h:619
casacore::uInt
unsigned int uInt
Definition: aipstype.h:51
casacore::TableExprNodeArray::getElemColumnShort
virtual Array< Short > getElemColumnShort(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArray::hasDouble
virtual Bool hasDouble(const TableExprId &id, Double value)
casacore::TableExprNodeArray::getElemBool
virtual Bool getElemBool(const TableExprId &id, const Slicer &index)
Get a single element from the array in the given row.
casacore::TableExprNodeArrayColumnString::getElemString
virtual String getElemString(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArrayColumnInt::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayColumnBool::TableExprNodeArrayColumnBool
TableExprNodeArrayColumnBool(const TableColumn &, const Table &)
casacore::TableExprNodeArrayPart::getBool
virtual Bool getBool(const TableExprId &id)
Get a scalar value for this node in the given row.
casacore::TableExprNodeArrayColumnString
String array column in table select expression.
Definition: ExprNodeArray.h:697
casacore::TableExprNodeArrayColumnInt64::col_p
ArrayColumn< Int64 > col_p
Definition: ExprNodeArray.h:519
casacore::TableExprNodeArrayColumnuShort::~TableExprNodeArrayColumnuShort
~TableExprNodeArrayColumnuShort()
casacore::TableExprNodeIndex::varIndex_p
Block< Bool > varIndex_p
Definition: ExprNodeArray.h:789
casacore::TableExprNodeArray::getElemString
virtual String getElemString(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArrayColumnuInt::getArrayInt
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
casacore::TableExprNodeArray
Base class for arrays in table select expression.
Definition: ExprNodeArray.h:65
casacore::TableExprNodeArrayColumnBool
Bool array column in table select expression.
Definition: ExprNodeArray.h:269
casacore::TableExprNodeArrayColumnDComplex
DComplex array column in table select expression.
Definition: ExprNodeArray.h:658
casacore::TableExprNodeArrayColumnComplex::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayColumnShort::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayPart::getColumnDataType
virtual Bool getColumnDataType(DataType &) const
Get the data type of this column (if possible).
casacore::TableExprNodeArrayColumnuInt::TableExprNodeArrayColumnuInt
TableExprNodeArrayColumnuInt(const TableColumn &, const Table &)
casacore::TableExprNodeArray::getElemColumnInt64
virtual Array< Int64 > getElemColumnInt64(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumnFloat::getElemDouble
virtual Double getElemDouble(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeIndex::incr_p
IPosition incr_p
Definition: ExprNodeArray.h:787
casacore::TableExprNodeArray::getSliceDouble
virtual MArray< Double > getSliceDouble(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnuInt::~TableExprNodeArrayColumnuInt
~TableExprNodeArrayColumnuInt()
casacore::TableExprNodeArrayColumnuInt::getElemInt
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeRep::shape
const IPosition & shape() const
Get the fixed shape (same for all rows).
Definition: ExprNodeRep.h:745
casacore::TableExprNodeArrayColumnInt64::getElemColumnInt64
virtual Array< Int64 > getElemColumnInt64(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumnDouble::~TableExprNodeArrayColumnDouble
~TableExprNodeArrayColumnDouble()
casacore::TableExprNodeIndex::getSlicer
const Slicer & getSlicer(const TableExprId &id)
Get the Slicer value for the slice.
Definition: ExprNodeArray.h:893
casacore::TableExprNodeArrayColumnBool::getArrayBool
virtual MArray< Bool > getArrayBool(const TableExprId &id)
Get an array value for this node in the given row.
casacore::TableExprNodeArray::getElemColumnString
virtual Array< String > getElemColumnString(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumnuShort
uShort array column in table select expression
Definition: ExprNodeArray.h:385
casacore::TableExprNodeArrayPart::getArrayBool
virtual MArray< Bool > getArrayBool(const TableExprId &id)
Get an array value for this node in the given row.
casacore::TableExprNodeArrayColumnuInt::getElemColumnuInt
virtual Array< uInt > getElemColumnuInt(const Vector< uInt > &rownrs, const Slicer &)
casacore::Int
int Int
Definition: aipstype.h:50
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
casacore::TableExprNodeArrayColumnFloat::getArrayDouble
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
casacore::TableExprNodeArrayColumnFloat::~TableExprNodeArrayColumnFloat
~TableExprNodeArrayColumnFloat()
casacore::TableExprNodeArrayColumnShort::~TableExprNodeArrayColumnShort
~TableExprNodeArrayColumnShort()
casacore::TableExprNodeArrayColumnInt::getElemColumnInt
virtual Array< Int > getElemColumnInt(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeIndex::checkIndexValues
void checkIndexValues(const TENShPtr &arrayNode)
Check if the index values match the dimensionality and shape of fixed-shaped array.
casacore::TableExprNodeArrayColumn::getShape
virtual const IPosition & getShape(const TableExprId &id)
Get the shape of the array in the given row.
casacore::TableExprNodeArray::hasDate
virtual Bool hasDate(const TableExprId &id, const MVTime &value)
casacore::TableExprNodeArrayColumnDComplex::~TableExprNodeArrayColumnDComplex
~TableExprNodeArrayColumnDComplex()
casacore::TableExprId
The identification of a TaQL selection subject.
Definition: TableExprId.h:97
casacore::TableExprNodeIndex::isSingle_p
Bool isSingle_p
Definition: ExprNodeArray.h:790
casacore::TableExprNodeSet
Class to hold multiple table expression nodes.
Definition: ExprNodeSet.h:311
casacore::TableExprNodeArrayColumnInt
Int array column in table select expression.
Definition: ExprNodeArray.h:424
casacore::TableExprNodeArray::hasDComplex
virtual Bool hasDComplex(const TableExprId &id, const DComplex &value)
casacore::TableExprNodeArray::makeConstantScalar
virtual TENShPtr makeConstantScalar()
Turn a constant array with one element into a scalar.
casacore::TableExprNodeArrayPart::getArrayDate
virtual MArray< MVTime > getArrayDate(const TableExprId &id)
casacore::TableExprNodeArray::hasArrayBool
virtual MArray< Bool > hasArrayBool(const TableExprId &id, const MArray< Bool > &value)
casacore::TableExprNodeArrayColumnString::getElemColumnString
virtual Array< String > getElemColumnString(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeIndex::isSingle
Bool isSingle() const
Does it index a single element?
Definition: ExprNodeArray.h:885
casacore::TableExprNodeArrayPart::TableExprNodeArrayPart
TableExprNodeArrayPart(const TENShPtr &arrayNode, const TENShPtr &indexNode)
casacore::TaQLStyle
Class with static members defining the TaQL style.
Definition: TaQLStyle.h:64
casacore::TableExprNodeArrayPart::getIndexNode
const TableExprNodeIndex * getIndexNode() const
Get the index node.
Definition: ExprNodeArray.h:906
casacore::TableExprNodeArray::getElemDouble
virtual Double getElemDouble(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArrayColumnFloat::TableExprNodeArrayColumnFloat
TableExprNodeArrayColumnFloat(const TableColumn &, const Table &)
casacore::TableExprNodeArrayColumnShort::getElemColumnShort
virtual Array< Short > getElemColumnShort(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArray::hasBool
virtual Bool hasBool(const TableExprId &id, Bool value)
Does a value occur in the set?
casacore::TableExprNodeArrayColumnComplex::col_p
ArrayColumn< Complex > col_p
Definition: ExprNodeArray.h:636
casacore::TableExprNodeArrayColumn::isDefined
virtual Bool isDefined(const TableExprId &id)
Is the value in the given row defined?
casacore::TableExprNodeArrayColumnuChar
uChar array column in table select expression
Definition: ExprNodeArray.h:307
casacore::TableExprNodeRep::NodeDataType
NodeDataType
Define the data types of a node.
Definition: ExprNodeRep.h:161
casacore::TableExprNodeArrayColumnShort::getElemInt
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArray::getSliceDComplex
virtual MArray< DComplex > getSliceDComplex(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnuChar::~TableExprNodeArrayColumnuChar
~TableExprNodeArrayColumnuChar()
casacore::TableExprNodeArrayPart::getColumnNode
const TableExprNodeArrayColumn * getColumnNode() const
Get the array column node.
Definition: ExprNodeArray.h:912
casacore::Int64
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
casacore::TableExprNodeArrayPart::getColumnuChar
virtual Array< uChar > getColumnuChar(const Vector< uInt > &rownrs)
casacore::TableExprNodeIndex::getNodeShape
IPosition getNodeShape(const TENShPtr &arrayNode) const
Get the shape of the node involved.
casacore::TableExprNodeArrayColumnDouble::TableExprNodeArrayColumnDouble
TableExprNodeArrayColumnDouble(const TableColumn &, const Table &)
casacore::TableExprNodeArrayColumnuInt
uInt array column in table select expression
Definition: ExprNodeArray.h:463
casacore::TableExprNodeArray::getArrayDouble
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
casacore::TableExprNodeArrayColumnuShort::getSliceInt
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnDComplex::col_p
ArrayColumn< DComplex > col_p
Definition: ExprNodeArray.h:675
casacore::TableExprNodeArrayColumnString::TableExprNodeArrayColumnString
TableExprNodeArrayColumnString(const TableColumn &, const Table &)
casacore::TableExprNodeArray::getSliceInt
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnDouble::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeRep
Abstract base class for a node in a table column expression tree.
Definition: ExprNodeRep.h:157
casacore::Array< Bool >
casacore::TableExprNodeArray::getElemColumnDouble
virtual Array< Double > getElemColumnDouble(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArray::getElemInt
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArray::hasArrayString
virtual MArray< Bool > hasArrayString(const TableExprId &id, const MArray< String > &value)
casacore::TableExprNodeArrayPart::inxNode_p
TableExprNodeIndex * inxNode_p
Definition: ExprNodeArray.h:877
casacore::TableExprNodeArrayColumn::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::String
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::TableExprNodeArrayColumnShort
Short array column in table select expression.
Definition: ExprNodeArray.h:346
casacore::TableExprNodeIndex::fillIndex
void fillIndex(const TableExprNodeSet &indices)
Link all the operands and check datatype.
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Block< Bool >
casacore::TableExprNodeArrayColumnInt64::getArrayInt
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
casacore::TableExprNodeArray::getElemColumnuInt
virtual Array< uInt > getElemColumnuInt(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayPart::getArrayInt
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
casacore::TableExprNodeArrayPart::getColumnInt64
virtual Array< Int64 > getColumnInt64(const Vector< uInt > &rownrs)
casacore::TableExprNodeArray::getElemDate
virtual MVTime getElemDate(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeArrayColumnDouble::col_p
ArrayColumn< Double > col_p
Definition: ExprNodeArray.h:597
casacore::TableExprNodeArray::~TableExprNodeArray
~TableExprNodeArray()
casacore::TableExprNodeArray::getSliceDate
virtual MArray< MVTime > getSliceDate(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnBool::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayColumnComplex::getSliceDComplex
virtual MArray< DComplex > getSliceDComplex(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnFloat::getSliceDouble
virtual MArray< Double > getSliceDouble(const TableExprId &id, const Slicer &)
casacore::TableExprNodeBinary
Abstract base class for a node having 0, 1, or 2 child nodes.
Definition: ExprNodeRep.h:558
casacore::TableExprNodeArrayColumn::getColumn
const TableColumn & getColumn() const
Get the TableColumn object.
Definition: ExprNodeArray.h:901
casacore::TableExprNodeIndex::fillSlicer
void fillSlicer(const TableExprId &id)
Fill the slicer for this row.
casacore::TableExprNodeArrayColumnString::~TableExprNodeArrayColumnString
~TableExprNodeArrayColumnString()
casacore::TableExprNodeArrayColumnInt64
Int64 array column in table select expression.
Definition: ExprNodeArray.h:502
casacore::Vector< uInt >
casacore::TableExprNodeArrayColumnComplex::getElemColumnComplex
virtual Array< Complex > getElemColumnComplex(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArrayColumnInt::~TableExprNodeArrayColumnInt
~TableExprNodeArrayColumnInt()
casacore::TableExprNodeArrayColumnInt64::getSliceInt
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayColumnString::getSliceString
virtual MArray< String > getSliceString(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayPart::getColumnString
virtual Array< String > getColumnString(const Vector< uInt > &rownrs)
casacore::TableExprNodeArrayPart::getArrayDComplex
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result.
casacore::TableExprNodeIndex::endMinus_p
Int endMinus_p
Definition: ExprNodeArray.h:783
casacore::TableExprNodeArrayColumnuChar::getSliceInt
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
casacore::TableExprNodeArrayPart::getColumnShort
virtual Array< Short > getColumnShort(const Vector< uInt > &rownrs)
casacore::TableExprNodeArray::varShape_p
IPosition varShape_p
Definition: ExprNodeArray.h:188
casacore::MArray< Double >
casacore::TableExprNodeArrayColumnBool::getElemColumnBool
virtual Array< Bool > getElemColumnBool(const Vector< uInt > &rownrs, const Slicer &)
Get a single element for the entire column (used by sort).
casacore::TableExprNodeArrayColumnInt64::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayPart::getColumnuInt
virtual Array< uInt > getColumnuInt(const Vector< uInt > &rownrs)
casacore::TableExprNodeArrayColumnString::col_p
ArrayColumn< String > col_p
Definition: ExprNodeArray.h:714
casacore::TableExprNodeArray::getElemDComplex
virtual DComplex getElemDComplex(const TableExprId &id, const Slicer &index)
casacore::TableExprNodeMulti
Abstract base class for a node having multiple child nodes.
Definition: ExprNodeRep.h:660
casacore::TableExprNodeArrayColumnInt64::~TableExprNodeArrayColumnInt64
~TableExprNodeArrayColumnInt64()
casacore::TableExprNodeArray::getElemColumnFloat
virtual Array< Float > getElemColumnFloat(const Vector< uInt > &rownrs, const Slicer &)
casacore::TableExprNodeArray::hasArrayDouble
virtual MArray< Bool > hasArrayDouble(const TableExprId &id, const MArray< Double > &value)
casacore::TableExprNodeArrayColumnInt::col_p
ArrayColumn< Int > col_p
Definition: ExprNodeArray.h:441
casacore::TableExprNodeArray::hasString
virtual Bool hasString(const TableExprId &id, const String &value)
casacore::TableExprNodeArrayColumn::getColumnDataType
virtual Bool getColumnDataType(DataType &) const
Get the data type of this column.
casacore::TableExprNodeArrayColumnuChar::col_p
ArrayColumn< uChar > col_p
Definition: ExprNodeArray.h:324
casacore::TableExprNodeArrayPart::getColumnDComplex
virtual Array< DComplex > getColumnDComplex(const Vector< uInt > &rownrs)
casacore::TableExprNodeArrayColumn::~TableExprNodeArrayColumn
~TableExprNodeArrayColumn()
casacore::TableExprNodeArrayColumnDComplex::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayColumnuChar::applySelection
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
casacore::TableExprNodeArrayColumnDouble
Double array column in table select expression.
Definition: ExprNodeArray.h:580