ExprGroupAggrFuncArray.h

Go to the documentation of this file.
00001 //# ExprGroupAggrFuncArray.h: The various array reduction aggregation functions
00002 //# Copyright (C) 2013
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: TaQLNode.h 21051 2011-04-20 11:46:29Z gervandiepen $
00027 
00028 #ifndef TABLES_EXPRGROUPAGGRFUNCARRAY_H
00029 #define TABLES_EXPRGROUPAGGRFUNCARRAY_H
00030 
00031 //# Includes
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/tables/TaQL/ExprGroup.h>
00034 #include <vector>
00035 
00036 
00037 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00038 
00039 
00040   // <summary>
00041   // Aggregate class counting if any array value in a group is true
00042   // </summary>
00043   // <use visibility=local>
00044   // <reviewed reviewer="" date="" tests="tExprGroup">
00045   // </reviewed>
00046   // <synopsis>
00047   // Aggregate class counting if any array value in a group is true.
00048   // </synopsis>
00049   class TableExprGroupArrayAny: public TableExprGroupFuncBool
00050   {
00051   public:
00052     TableExprGroupArrayAny (TableExprNodeRep* node);
00053     virtual ~TableExprGroupArrayAny();
00054     virtual void apply (const TableExprId& id);
00055   };
00056 
00057   // <summary>
00058   // Aggregate class counting if all array values in a group are true
00059   // </summary>
00060   // <use visibility=local>
00061   // <reviewed reviewer="" date="" tests="tExprGroup">
00062   // </reviewed>
00063   // <synopsis>
00064   // Aggregate class counting if all array values in a group are true.
00065   // </synopsis>
00066   class TableExprGroupArrayAll: public TableExprGroupFuncBool
00067   {
00068   public:
00069     TableExprGroupArrayAll (TableExprNodeRep* node);
00070     virtual ~TableExprGroupArrayAll();
00071     virtual void apply (const TableExprId& id);
00072   };
00073 
00074   // <summary>
00075   // Aggregate class counting the number of true array values in a group
00076   // </summary>
00077   // <use visibility=local>
00078   // <reviewed reviewer="" date="" tests="tExprGroup">
00079   // </reviewed>
00080   // <synopsis>
00081   // Aggregate class counting the number of true array values in a group.
00082   // </synopsis>
00083   class TableExprGroupArrayNTrue: public TableExprGroupFuncInt
00084   {
00085   public:
00086     TableExprGroupArrayNTrue (TableExprNodeRep* node);
00087     virtual ~TableExprGroupArrayNTrue();
00088     virtual void apply (const TableExprId& id);
00089   };
00090 
00091   // <summary>
00092   // Aggregate class counting the number of false array values in a group
00093   // </summary>
00094   // <use visibility=local>
00095   // <reviewed reviewer="" date="" tests="tExprGroup">
00096   // </reviewed>
00097   // <synopsis>
00098   // Aggregate class counting the number of false array values in a group.
00099   // </synopsis>
00100   class TableExprGroupArrayNFalse: public TableExprGroupFuncInt
00101   {
00102   public:
00103     TableExprGroupArrayNFalse (TableExprNodeRep* node);
00104     virtual ~TableExprGroupArrayNFalse();
00105     virtual void apply (const TableExprId& id);
00106   };
00107 
00108 
00109   // <summary>
00110   // Aggregate class determining the minimum integer array value in a group
00111   // </summary>
00112   // <use visibility=local>
00113   // <reviewed reviewer="" date="" tests="tExprGroup">
00114   // </reviewed>
00115   // <synopsis>
00116   // Aggregate class determining the minimum integer array value in a group.
00117   // </synopsis>
00118   class TableExprGroupMinArrayInt: public TableExprGroupFuncInt
00119   {
00120   public:
00121     TableExprGroupMinArrayInt (TableExprNodeRep* node);
00122     virtual ~TableExprGroupMinArrayInt();
00123     virtual void apply (const TableExprId& id);
00124   };
00125 
00126   // <summary>
00127   // Aggregate class determining the maximum integer array value in a group
00128   // </summary>
00129   // <use visibility=local>
00130   // <reviewed reviewer="" date="" tests="tExprGroup">
00131   // </reviewed>
00132   // <synopsis>
00133   // Aggregate class determining the maximum integer array value in a group.
00134   // </synopsis>
00135   class TableExprGroupMaxArrayInt: public TableExprGroupFuncInt
00136   {
00137   public:
00138     TableExprGroupMaxArrayInt (TableExprNodeRep* node);
00139     virtual ~TableExprGroupMaxArrayInt();
00140     virtual void apply (const TableExprId& id);
00141   };
00142 
00143   // <summary>
00144   // Aggregate class determining the sum of integer array values in a group
00145   // </summary>
00146   // <use visibility=local>
00147   // <reviewed reviewer="" date="" tests="tExprGroup">
00148   // </reviewed>
00149   // <synopsis>
00150   // Aggregate class determining the sum of integer array values in a group.
00151   // </synopsis>
00152   class TableExprGroupSumArrayInt: public TableExprGroupFuncInt
00153   {
00154   public:
00155     TableExprGroupSumArrayInt (TableExprNodeRep* node);
00156     virtual ~TableExprGroupSumArrayInt();
00157     virtual void apply (const TableExprId& id);
00158   };
00159 
00160   // <summary>
00161   // Aggregate class determining the product of integer array values in a group
00162   // </summary>
00163   // <use visibility=local>
00164   // <reviewed reviewer="" date="" tests="tExprGroup">
00165   // </reviewed>
00166   // <synopsis>
00167   // Aggregate class determining the product of integer array values in a group.
00168   // </synopsis>
00169   class TableExprGroupProductArrayInt: public TableExprGroupFuncInt
00170   {
00171   public:
00172     TableExprGroupProductArrayInt (TableExprNodeRep* node);
00173     virtual ~TableExprGroupProductArrayInt();
00174     virtual void apply (const TableExprId& id);
00175   };
00176 
00177   // <summary>
00178   // Aggregate class determining the sum of squares of integer array values
00179   // in a group
00180   // </summary>
00181   // <use visibility=local>
00182   // <reviewed reviewer="" date="" tests="tExprGroup">
00183   // </reviewed>
00184   // <synopsis>
00185   // Aggregate class determining the sum of squares of integer array values
00186   // in a group.
00187   // </synopsis>
00188   class TableExprGroupSumSqrArrayInt: public TableExprGroupFuncInt
00189   {
00190   public:
00191     TableExprGroupSumSqrArrayInt (TableExprNodeRep* node);
00192     virtual ~TableExprGroupSumSqrArrayInt();
00193     virtual void apply (const TableExprId& id);
00194   };
00195 
00196 
00197   // <summary>
00198   // Aggregate class determining the minimum double array value in a group
00199   // </summary>
00200   // <use visibility=local>
00201   // <reviewed reviewer="" date="" tests="tExprGroup">
00202   // </reviewed>
00203   // <synopsis>
00204   // Aggregate class determining the minimum double array value in a group.
00205   // </synopsis>
00206   class TableExprGroupMinArrayDouble: public TableExprGroupFuncDouble
00207   {
00208   public:
00209     TableExprGroupMinArrayDouble (TableExprNodeRep* node);
00210     virtual ~TableExprGroupMinArrayDouble();
00211     virtual void apply (const TableExprId& id);
00212   };
00213 
00214   // <summary>
00215   // Aggregate class determining the maximum double array value in a group
00216   // </summary>
00217   // <use visibility=local>
00218   // <reviewed reviewer="" date="" tests="tExprGroup">
00219   // </reviewed>
00220   // <synopsis>
00221   // Aggregate class determining the maximum double array value in a group.
00222   // </synopsis>
00223   class TableExprGroupMaxArrayDouble: public TableExprGroupFuncDouble
00224   {
00225   public:
00226     TableExprGroupMaxArrayDouble (TableExprNodeRep* node);
00227     virtual ~TableExprGroupMaxArrayDouble();
00228     virtual void apply (const TableExprId& id);
00229   };
00230 
00231   // <summary>
00232   // Aggregate class determining the sum of double array values in a group
00233   // </summary>
00234   // <use visibility=local>
00235   // <reviewed reviewer="" date="" tests="tExprGroup">
00236   // </reviewed>
00237   // <synopsis>
00238   // Aggregate class determining the sum of double array values in a group.
00239   // </synopsis>
00240   class TableExprGroupSumArrayDouble: public TableExprGroupFuncDouble
00241   {
00242   public:
00243     TableExprGroupSumArrayDouble (TableExprNodeRep* node);
00244     virtual ~TableExprGroupSumArrayDouble();
00245     virtual void apply (const TableExprId& id);
00246   };
00247 
00248   // <summary>
00249   // Aggregate class determining the product of double array values in a group
00250   // </summary>
00251   // <use visibility=local>
00252   // <reviewed reviewer="" date="" tests="tExprGroup">
00253   // </reviewed>
00254   // <synopsis>
00255   // Aggregate class determining the product of double array values in a group.
00256   // </synopsis>
00257   class TableExprGroupProductArrayDouble: public TableExprGroupFuncDouble
00258   {
00259   public:
00260     TableExprGroupProductArrayDouble (TableExprNodeRep* node);
00261     virtual ~TableExprGroupProductArrayDouble();
00262     virtual void apply (const TableExprId& id);
00263   };
00264 
00265   // <summary>
00266   // Aggregate class determining the sum of squares of double array values
00267   // in a group
00268   // </summary>
00269   // <use visibility=local>
00270   // <reviewed reviewer="" date="" tests="tExprGroup">
00271   // </reviewed>
00272   // <synopsis>
00273   // Aggregate class determining the sum of squares of double array values
00274   // in a group.
00275   // </synopsis>
00276   class TableExprGroupSumSqrArrayDouble: public TableExprGroupFuncDouble
00277   {
00278   public:
00279     TableExprGroupSumSqrArrayDouble (TableExprNodeRep* node);
00280     virtual ~TableExprGroupSumSqrArrayDouble();
00281     virtual void apply (const TableExprId& id);
00282   };
00283 
00284   // <summary>
00285   // Aggregate class determining the mean of array values in a group
00286   // </summary>
00287   // <use visibility=local>
00288   // <reviewed reviewer="" date="" tests="tExprGroup">
00289   // </reviewed>
00290   // <synopsis>
00291   // Aggregate class determining the mean of array values in a group.
00292   // </synopsis>
00293   class TableExprGroupMeanArrayDouble: public TableExprGroupFuncDouble
00294   {
00295   public:
00296     TableExprGroupMeanArrayDouble (TableExprNodeRep* node);
00297     virtual ~TableExprGroupMeanArrayDouble();
00298     virtual void apply (const TableExprId& id);
00299     virtual void finish();
00300   private:
00301     Int64 itsNr;
00302   };
00303 
00304   // <summary>
00305   // Aggregate class determining the variance of array values in a group
00306   // </summary>
00307   // <use visibility=local>
00308   // <reviewed reviewer="" date="" tests="tExprGroup">
00309   // </reviewed>
00310   // <synopsis>
00311   // Aggregate class determining the variance of array values in a group.
00312   // It uses a running algorithm
00313   // (see en.wikipedia.org/wiki/Algorithms_for_calculating_variance)
00314   // </synopsis>
00315   class TableExprGroupVarianceArrayDouble: public TableExprGroupFuncDouble
00316   {
00317   public:
00318     TableExprGroupVarianceArrayDouble (TableExprNodeRep* node);
00319     virtual ~TableExprGroupVarianceArrayDouble();
00320     virtual void apply (const TableExprId& id);
00321     virtual void finish();
00322   protected:
00323     Int64  itsNr;
00324     Double itsM2;
00325   };
00326 
00327   // <summary>
00328   // Aggregate class determining the standard devation of array values
00329   // in a group
00330   // </summary>
00331   // <use visibility=local>
00332   // <reviewed reviewer="" date="" tests="tExprGroup">
00333   // </reviewed>
00334   // <synopsis>
00335   // Aggregate class determining the standard deviation of array values
00336   // in a group. It uses a running algorithm
00337   // (see en.wikipedia.org/wiki/Algorithms_for_calculating_variance)
00338   // </synopsis>
00339   class TableExprGroupStdDevArrayDouble: public TableExprGroupVarianceArrayDouble
00340   {
00341   public:
00342     TableExprGroupStdDevArrayDouble (TableExprNodeRep* node);
00343     virtual ~TableExprGroupStdDevArrayDouble();
00344     virtual void finish();
00345   };
00346 
00347   // <summary>
00348   // Aggregate class determining the RMS of array values in a group
00349   // </summary>
00350   // <use visibility=local>
00351   // <reviewed reviewer="" date="" tests="tExprGroup">
00352   // </reviewed>
00353   // <synopsis>
00354   // Aggregate class determining the RMS of array values in a group.
00355   // </synopsis>
00356   class TableExprGroupRmsArrayDouble: public TableExprGroupFuncDouble
00357   {
00358   public:
00359     TableExprGroupRmsArrayDouble (TableExprNodeRep* node);
00360     virtual ~TableExprGroupRmsArrayDouble();
00361     virtual void apply (const TableExprId& id);
00362     virtual void finish();
00363   private:
00364     Int64 itsNr;
00365   };
00366 
00367   // <summary>
00368   // Aggregate class determining the fractile of array values in a group
00369   // </summary>
00370   // <use visibility=local>
00371   // <reviewed reviewer="" date="" tests="tExprGroup">
00372   // </reviewed>
00373   // <synopsis>
00374   // Aggregate class determining the fractile of array values in a group.
00375   // <br>It is a lazy aggregate class, thus <src>apply</src> does nothing.
00376   // Instead, <src>getDouble</src> assembles the values and determines the
00377   // fractile.
00378   // </synopsis>
00379   class TableExprGroupFractileArrayDouble: public TableExprGroupFuncDouble
00380   {
00381   public:
00382     explicit TableExprGroupFractileArrayDouble (TableExprNodeRep* node,
00383                                                 Double fractile);
00384     virtual ~TableExprGroupFractileArrayDouble();
00385     virtual Bool isLazy() const;
00386     virtual void apply (const TableExprId& id);
00387     virtual Double getDouble (const vector<TableExprId>& ids);
00388   private:
00389     Double itsFrac;
00390   };
00391 
00392 
00393   // <summary>
00394   // Aggregate class determining the sum of complex array values in a group
00395   // </summary>
00396   // <use visibility=local>
00397   // <reviewed reviewer="" date="" tests="tExprGroup">
00398   // </reviewed>
00399   // <synopsis>
00400   // Aggregate class determining the sum of complex array values in a group.
00401   // </synopsis>
00402   class TableExprGroupSumArrayDComplex: public TableExprGroupFuncDComplex
00403   {
00404   public:
00405     TableExprGroupSumArrayDComplex (TableExprNodeRep* node);
00406     virtual ~TableExprGroupSumArrayDComplex();
00407     virtual void apply (const TableExprId& id);
00408   };
00409 
00410   // <summary>
00411   // Aggregate class determining the product of complex array values in a group
00412   // </summary>
00413   // <use visibility=local>
00414   // <reviewed reviewer="" date="" tests="tExprGroup">
00415   // </reviewed>
00416   // <synopsis>
00417   // Aggregate class determining the product of complex array values in a group.
00418   // </synopsis>
00419   class TableExprGroupProductArrayDComplex: public TableExprGroupFuncDComplex
00420   {
00421   public:
00422     TableExprGroupProductArrayDComplex (TableExprNodeRep* node);
00423     virtual ~TableExprGroupProductArrayDComplex();
00424     virtual void apply (const TableExprId& id);
00425   };
00426 
00427   // <summary>
00428   // Aggregate class determining the sum of squares of complex array values
00429   // in a group
00430   // </summary>
00431   // <use visibility=local>
00432   // <reviewed reviewer="" date="" tests="tExprGroup">
00433   // </reviewed>
00434   // <synopsis>
00435   // Aggregate class determining the sum of squares of complex array values
00436   // in a group.
00437   // </synopsis>
00438   class TableExprGroupSumSqrArrayDComplex: public TableExprGroupFuncDComplex
00439   {
00440   public:
00441     TableExprGroupSumSqrArrayDComplex (TableExprNodeRep* node);
00442     virtual ~TableExprGroupSumSqrArrayDComplex();
00443     virtual void apply (const TableExprId& id);
00444   };
00445 
00446   // <summary>
00447   // Aggregate class determining the mean of complex array values in a group
00448   // </summary>
00449   // <use visibility=local>
00450   // <reviewed reviewer="" date="" tests="tExprGroup">
00451   // </reviewed>
00452   // <synopsis>
00453   // Aggregate class determining the mean of complex array values in a group.
00454   // </synopsis>
00455   class TableExprGroupMeanArrayDComplex: public TableExprGroupFuncDComplex
00456   {
00457   public:
00458     TableExprGroupMeanArrayDComplex (TableExprNodeRep* node);
00459     virtual ~TableExprGroupMeanArrayDComplex();
00460     virtual void apply (const TableExprId& id);
00461     virtual void finish();
00462   private:
00463     Int64 itsNr;
00464   };
00465 
00466   // <summary>
00467   // Aggregate class counting per array index in a group if any is true
00468   // </summary>
00469   // <use visibility=local>
00470   // <reviewed reviewer="" date="" tests="tExprGroup">
00471   // </reviewed>
00472   // <synopsis>
00473   // Aggregate class counting per array index in a group if any is true.
00474   // </synopsis>
00475   class TableExprGroupArrayAnys: public TableExprGroupFuncArrayBool
00476   {
00477   public:
00478     TableExprGroupArrayAnys (TableExprNodeRep* node);
00479     virtual ~TableExprGroupArrayAnys();
00480     virtual void apply (const TableExprId& id);
00481   };
00482 
00483   // <summary>
00484   // Aggregate class counting per array index in a group if all are true
00485   // </summary>
00486   // <use visibility=local>
00487   // <reviewed reviewer="" date="" tests="tExprGroup">
00488   // </reviewed>
00489   // <synopsis>
00490   // Aggregate class counting per array index in a group if all are true.
00491   // </synopsis>
00492   class TableExprGroupArrayAlls: public TableExprGroupFuncArrayBool
00493   {
00494   public:
00495     TableExprGroupArrayAlls (TableExprNodeRep* node);
00496     virtual ~TableExprGroupArrayAlls();
00497     virtual void apply (const TableExprId& id);
00498   };
00499 
00500   // <summary>
00501   // Aggregate class counting per array index in a group the nr of true values
00502   // </summary>
00503   // <use visibility=local>
00504   // <reviewed reviewer="" date="" tests="tExprGroup">
00505   // </reviewed>
00506   // <synopsis>
00507   // Aggregate class counting per array index in a group the nr of true values.
00508   // </synopsis>
00509   class TableExprGroupArrayNTrues: public TableExprGroupFuncArrayInt
00510   {
00511   public:
00512     TableExprGroupArrayNTrues (TableExprNodeRep* node);
00513     virtual ~TableExprGroupArrayNTrues();
00514     virtual void apply (const TableExprId& id);
00515   };
00516 
00517   // <summary>
00518   // Aggregate class counting per array index in a group the nr of false values
00519   // </summary>
00520   // <use visibility=local>
00521   // <reviewed reviewer="" date="" tests="tExprGroup">
00522   // </reviewed>
00523   // <synopsis>
00524   // Aggregate class counting per array index in a group the nr of false values.
00525   // </synopsis>
00526   class TableExprGroupArrayNFalses: public TableExprGroupFuncArrayInt
00527   {
00528   public:
00529     TableExprGroupArrayNFalses (TableExprNodeRep* node);
00530     virtual ~TableExprGroupArrayNFalses();
00531     virtual void apply (const TableExprId& id);
00532   };
00533 
00534   // <summary>
00535   // Aggregate class determining per array index in a group the minimum value
00536   // </summary>
00537   // <use visibility=local>
00538   // <reviewed reviewer="" date="" tests="tExprGroup">
00539   // </reviewed>
00540   // <synopsis>
00541   // Aggregate class determining per array index in a group the minimum value.
00542   // </synopsis>
00543   class TableExprGroupMinsArrayInt: public TableExprGroupFuncArrayInt
00544   {
00545   public:
00546     TableExprGroupMinsArrayInt (TableExprNodeRep* node);
00547     virtual ~TableExprGroupMinsArrayInt();
00548     virtual void apply (const TableExprId& id);
00549     virtual void finish();
00550   };
00551 
00552   // <summary>
00553   // Aggregate class determining per array index in a group the maximum value
00554   // </summary>
00555   // <use visibility=local>
00556   // <reviewed reviewer="" date="" tests="tExprGroup">
00557   // </reviewed>
00558   // <synopsis>
00559   // Aggregate class determining per array index in a group the maximum value.
00560   // </synopsis>
00561   class TableExprGroupMaxsArrayInt: public TableExprGroupFuncArrayInt
00562   {
00563   public:
00564     TableExprGroupMaxsArrayInt (TableExprNodeRep* node);
00565     virtual ~TableExprGroupMaxsArrayInt();
00566     virtual void apply (const TableExprId& id);
00567     virtual void finish();
00568   };
00569 
00570   // <summary>
00571   // Aggregate class determining per array index in a group the sum of values
00572   // </summary>
00573   // <use visibility=local>
00574   // <reviewed reviewer="" date="" tests="tExprGroup">
00575   // </reviewed>
00576   // <synopsis>
00577   // Aggregate class determining per array index in a group the sum of values.
00578   // </synopsis>
00579   class TableExprGroupSumsArrayInt: public TableExprGroupFuncArrayInt
00580   {
00581   public:
00582     TableExprGroupSumsArrayInt (TableExprNodeRep* node);
00583     virtual ~TableExprGroupSumsArrayInt();
00584     virtual void apply (const TableExprId& id);
00585   };
00586 
00587   // <summary>
00588   // Aggregate class determining per array index in a group the product of values
00589   // </summary>
00590   // <use visibility=local>
00591   // <reviewed reviewer="" date="" tests="tExprGroup">
00592   // </reviewed>
00593   // <synopsis>
00594   // Aggregate class determining per array index in a group the product of values.
00595   // </synopsis>
00596   class TableExprGroupProductsArrayInt: public TableExprGroupFuncArrayInt
00597   {
00598   public:
00599     TableExprGroupProductsArrayInt (TableExprNodeRep* node);
00600     virtual ~TableExprGroupProductsArrayInt();
00601     virtual void apply (const TableExprId& id);
00602     virtual void finish();
00603   };
00604 
00605   // <summary>
00606   // Aggregate class determining per array index in a group the sum of value squares
00607   // in a group
00608   // </summary>
00609   // <use visibility=local>
00610   // <reviewed reviewer="" date="" tests="tExprGroup">
00611   // </reviewed>
00612   // <synopsis>
00613   // Aggregate class determining per array index in a group the sum of value squares.
00614   // </synopsis>
00615   class TableExprGroupSumSqrsArrayInt: public TableExprGroupFuncArrayInt
00616   {
00617   public:
00618     TableExprGroupSumSqrsArrayInt (TableExprNodeRep* node);
00619     virtual ~TableExprGroupSumSqrsArrayInt();
00620     virtual void apply (const TableExprId& id);
00621   };
00622 
00623 
00624   // <summary>
00625   // Aggregate class determining the minimum double array value in a group
00626   // </summary>
00627   // <use visibility=local>
00628   // <reviewed reviewer="" date="" tests="tExprGroup">
00629   // </reviewed>
00630   // <synopsis>
00631   // Aggregate class determining the minimum double array value in a group.
00632   // </synopsis>
00633   class TableExprGroupMinsArrayDouble: public TableExprGroupFuncArrayDouble
00634   {
00635   public:
00636     TableExprGroupMinsArrayDouble (TableExprNodeRep* node);
00637     virtual ~TableExprGroupMinsArrayDouble();
00638     virtual void apply (const TableExprId& id);
00639     virtual void finish();
00640   };
00641 
00642   // <summary>
00643   // Aggregate class determining the maximum double array value in a group
00644   // </summary>
00645   // <use visibility=local>
00646   // <reviewed reviewer="" date="" tests="tExprGroup">
00647   // </reviewed>
00648   // <synopsis>
00649   // Aggregate class determining the maximum double array value in a group.
00650   // </synopsis>
00651   class TableExprGroupMaxsArrayDouble: public TableExprGroupFuncArrayDouble
00652   {
00653   public:
00654     TableExprGroupMaxsArrayDouble (TableExprNodeRep* node);
00655     virtual ~TableExprGroupMaxsArrayDouble();
00656     virtual void apply (const TableExprId& id);
00657     virtual void finish();
00658   };
00659 
00660   // <summary>
00661   // Aggregate class determining the sum of double array values in a group
00662   // </summary>
00663   // <use visibility=local>
00664   // <reviewed reviewer="" date="" tests="tExprGroup">
00665   // </reviewed>
00666   // <synopsis>
00667   // Aggregate class determining the sum of double array values in a group.
00668   // </synopsis>
00669   class TableExprGroupSumsArrayDouble: public TableExprGroupFuncArrayDouble
00670   {
00671   public:
00672     TableExprGroupSumsArrayDouble (TableExprNodeRep* node);
00673     virtual ~TableExprGroupSumsArrayDouble();
00674     virtual void apply (const TableExprId& id);
00675   };
00676 
00677   // <summary>
00678   // Aggregate class determining the product of double array values in a group
00679   // </summary>
00680   // <use visibility=local>
00681   // <reviewed reviewer="" date="" tests="tExprGroup">
00682   // </reviewed>
00683   // <synopsis>
00684   // Aggregate class determining the product of double array values in a group.
00685   // </synopsis>
00686   class TableExprGroupProductsArrayDouble: public TableExprGroupFuncArrayDouble
00687   {
00688   public:
00689     TableExprGroupProductsArrayDouble (TableExprNodeRep* node);
00690     virtual ~TableExprGroupProductsArrayDouble();
00691     virtual void apply (const TableExprId& id);
00692     virtual void finish();
00693   };
00694 
00695   // <summary>
00696   // Aggregate class determining the sum of squares of double array values
00697   // in a group
00698   // </summary>
00699   // <use visibility=local>
00700   // <reviewed reviewer="" date="" tests="tExprGroup">
00701   // </reviewed>
00702   // <synopsis>
00703   // Aggregate class determining the sum of squares of double array values
00704   // in a group.
00705   // </synopsis>
00706   class TableExprGroupSumSqrsArrayDouble: public TableExprGroupFuncArrayDouble
00707   {
00708   public:
00709     TableExprGroupSumSqrsArrayDouble (TableExprNodeRep* node);
00710     virtual ~TableExprGroupSumSqrsArrayDouble();
00711     virtual void apply (const TableExprId& id);
00712   };
00713 
00714   // <summary>
00715   // Aggregate class determining the mean of array values in a group
00716   // </summary>
00717   // <use visibility=local>
00718   // <reviewed reviewer="" date="" tests="tExprGroup">
00719   // </reviewed>
00720   // <synopsis>
00721   // Aggregate class determining the mean of array values in a group.
00722   // </synopsis>
00723   class TableExprGroupMeansArrayDouble: public TableExprGroupFuncArrayDouble
00724   {
00725   public:
00726     TableExprGroupMeansArrayDouble (TableExprNodeRep* node);
00727     virtual ~TableExprGroupMeansArrayDouble();
00728     virtual void apply (const TableExprId& id);
00729     virtual void finish();
00730   private:
00731     Array<Int64> itsNr;
00732   };
00733 
00734   // <summary>
00735   // Aggregate class determining the variance of array values in a group
00736   // </summary>
00737   // <use visibility=local>
00738   // <reviewed reviewer="" date="" tests="tExprGroup">
00739   // </reviewed>
00740   // <synopsis>
00741   // Aggregate class determining the variance of array values in a group.
00742   // It uses a running algorithm
00743   // (see en.wikipedia.org/wiki/Algorithms_for_calculating_variance)
00744   // </synopsis>
00745   class TableExprGroupVariancesArrayDouble: public TableExprGroupFuncArrayDouble
00746   {
00747   public:
00748     TableExprGroupVariancesArrayDouble (TableExprNodeRep* node);
00749     virtual ~TableExprGroupVariancesArrayDouble();
00750     virtual void apply (const TableExprId& id);
00751     virtual void finish();
00752   protected:
00753     Array<Int64>  itsNr;
00754     Array<Double> itsMean;
00755   };
00756 
00757   // <summary>
00758   // Aggregate class determining the standard devation of array values
00759   // in a group
00760   // </summary>
00761   // <use visibility=local>
00762   // <reviewed reviewer="" date="" tests="tExprGroup">
00763   // </reviewed>
00764   // <synopsis>
00765   // Aggregate class determining the standard deviation of array values
00766   // in a group. It uses a running algorithm
00767   // (see en.wikipedia.org/wiki/Algorithms_for_calculating_variance)
00768   // </synopsis>
00769   class TableExprGroupStdDevsArrayDouble: public TableExprGroupVariancesArrayDouble
00770   {
00771   public:
00772     TableExprGroupStdDevsArrayDouble (TableExprNodeRep* node);
00773     virtual ~TableExprGroupStdDevsArrayDouble();
00774     virtual void finish();
00775   };
00776 
00777   // <summary>
00778   // Aggregate class determining the RMS of array values in a group
00779   // </summary>
00780   // <use visibility=local>
00781   // <reviewed reviewer="" date="" tests="tExprGroup">
00782   // </reviewed>
00783   // <synopsis>
00784   // Aggregate class determining the RMS of array values in a group.
00785   // </synopsis>
00786   class TableExprGroupRmssArrayDouble: public TableExprGroupFuncArrayDouble
00787   {
00788   public:
00789     TableExprGroupRmssArrayDouble (TableExprNodeRep* node);
00790     virtual ~TableExprGroupRmssArrayDouble();
00791     virtual void apply (const TableExprId& id);
00792     virtual void finish();
00793   private:
00794     Array<Int64> itsNr;
00795   };
00796 
00797 
00798   // <summary>
00799   // Aggregate class determining the sum of complex array values in a group
00800   // </summary>
00801   // <use visibility=local>
00802   // <reviewed reviewer="" date="" tests="tExprGroup">
00803   // </reviewed>
00804   // <synopsis>
00805   // Aggregate class determining the sum of complex array values in a group.
00806   // </synopsis>
00807   class TableExprGroupSumsArrayDComplex: public TableExprGroupFuncArrayDComplex
00808   {
00809   public:
00810     TableExprGroupSumsArrayDComplex (TableExprNodeRep* node);
00811     virtual ~TableExprGroupSumsArrayDComplex();
00812     virtual void apply (const TableExprId& id);
00813   };
00814 
00815   // <summary>
00816   // Aggregate class determining the product of complex array values in a group
00817   // </summary>
00818   // <use visibility=local>
00819   // <reviewed reviewer="" date="" tests="tExprGroup">
00820   // </reviewed>
00821   // <synopsis>
00822   // Aggregate class determining the product of complex array values in a group.
00823   // </synopsis>
00824   class TableExprGroupProductsArrayDComplex: public TableExprGroupFuncArrayDComplex
00825   {
00826   public:
00827     TableExprGroupProductsArrayDComplex (TableExprNodeRep* node);
00828     virtual ~TableExprGroupProductsArrayDComplex();
00829     virtual void apply (const TableExprId& id);
00830     virtual void finish();
00831   };
00832 
00833   // <summary>
00834   // Aggregate class determining the sum of squares of complex array values
00835   // in a group
00836   // </summary>
00837   // <use visibility=local>
00838   // <reviewed reviewer="" date="" tests="tExprGroup">
00839   // </reviewed>
00840   // <synopsis>
00841   // Aggregate class determining the sum of squares of complex array values
00842   // in a group.
00843   // </synopsis>
00844   class TableExprGroupSumSqrsArrayDComplex: public TableExprGroupFuncArrayDComplex
00845   {
00846   public:
00847     TableExprGroupSumSqrsArrayDComplex (TableExprNodeRep* node);
00848     virtual ~TableExprGroupSumSqrsArrayDComplex();
00849     virtual void apply (const TableExprId& id);
00850   };
00851 
00852   // <summary>
00853   // Aggregate class determining the mean of complex array values in a group
00854   // </summary>
00855   // <use visibility=local>
00856   // <reviewed reviewer="" date="" tests="tExprGroup">
00857   // </reviewed>
00858   // <synopsis>
00859   // Aggregate class determining the mean of complex array values in a group.
00860   // </synopsis>
00861   class TableExprGroupMeansArrayDComplex: public TableExprGroupFuncArrayDComplex
00862   {
00863   public:
00864     TableExprGroupMeansArrayDComplex (TableExprNodeRep* node);
00865     virtual ~TableExprGroupMeansArrayDComplex();
00866     virtual void apply (const TableExprId& id);
00867     virtual void finish();
00868   private:
00869     Array<Int64> itsNr;
00870   };
00871 
00872 
00873   // <summary>
00874   // Base aggregate class determining the histogram of values in a group
00875   // </summary>
00876   // <use visibility=local>
00877   // <reviewed reviewer="" date="" tests="tExprGroup">
00878   // </reviewed>
00879   // <synopsis>
00880   // Base aggregate class determining the histogram of values in a group
00881   // </synopsis>
00882   class TableExprGroupHistBase: public TableExprGroupFuncBase
00883   {
00884   public:
00885     explicit TableExprGroupHistBase (TableExprNodeRep* node,
00886                                      Int64 nbin, Double start, Double end);
00887     virtual ~TableExprGroupHistBase();
00888     virtual MArray<Int64> getArrayInt (const vector<TableExprId>&);
00889   protected:
00890     // Add the value to the histogram.
00891     void add (Double value);
00892   private:
00893     Vector<Int64> itsHist;
00894     Double itsStart;
00895     Double itsWidth;
00896   };
00897 
00898   // <summary>
00899   // Aggregate class determining the histogram of scalar values in a group
00900   // </summary>
00901   // <use visibility=local>
00902   // <reviewed reviewer="" date="" tests="tExprGroup">
00903   // </reviewed>
00904   // <synopsis>
00905   // Aggregate class determining the histogram of scalar values in a group
00906   // </synopsis>
00907   class TableExprGroupHistScalar: public TableExprGroupHistBase
00908   {
00909   public:
00910     explicit TableExprGroupHistScalar (TableExprNodeRep* node,
00911                                        Int64 nbin, Double start, Double end);
00912     virtual ~TableExprGroupHistScalar();
00913     virtual void apply (const TableExprId& id);
00914   };
00915 
00916   // <summary>
00917   // Aggregate class determining the histogram of integer array values in a group
00918   // </summary>
00919   // <use visibility=local>
00920   // <reviewed reviewer="" date="" tests="tExprGroup">
00921   // </reviewed>
00922   // <synopsis>
00923   // Aggregate class determining the histogram of integer array values in a group
00924   // </synopsis>
00925   class TableExprGroupHistInt: public TableExprGroupHistBase
00926   {
00927   public:
00928     explicit TableExprGroupHistInt (TableExprNodeRep* node,
00929                                     Int64 nbin, Double start, Double end);
00930     virtual ~TableExprGroupHistInt();
00931     virtual void apply (const TableExprId& id);
00932   };
00933 
00934   // <summary>
00935   // Aggregate class determining the histogram of double array values in a group
00936   // </summary>
00937   // <use visibility=local>
00938   // <reviewed reviewer="" date="" tests="tExprGroup">
00939   // </reviewed>
00940   // <synopsis>
00941   // Aggregate class determining the histogram of double array values in a group
00942   // </synopsis>
00943   class TableExprGroupHistDouble: public TableExprGroupHistBase
00944   {
00945   public:
00946     explicit TableExprGroupHistDouble (TableExprNodeRep* node,
00947                                        Int64 nbin, Double start, Double end);
00948     virtual ~TableExprGroupHistDouble();
00949     virtual void apply (const TableExprId& id);
00950   };
00951 
00952 
00953 } //# NAMESPACE CASACORE - END
00954 
00955 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1