casacore
|
Abstract base class for classes calculating an aggregated group result. More...
#include <ExprGroup.h>
Public Member Functions | |
TableExprGroupFuncBase (TableExprNodeRep *node) | |
Construct from the TaQL aggregation node. More... | |
virtual | ~TableExprGroupFuncBase () |
virtual Bool | isLazy () const |
Does the aggregate function use lazy semantics? The default implementation returns False. More... | |
uInt | seqnr () const |
Get the function's sequence nr. More... | |
void | setSeqnr (uInt seqnr) |
Set the function's sequence nr. More... | |
virtual void | apply (const TableExprId &id)=0 |
Get the operand's value for the given row and apply it to the aggregation. More... | |
virtual void | finish () |
If needed, finish the aggregation. More... | |
virtual CountedPtr< vector< TableExprId > > | getIds () const |
Get the assembled TableExprIds of a group. More... | |
virtual Bool | getBool (const vector< TableExprId > &=vector< TableExprId >()) |
Get the aggregated value. More... | |
virtual Int64 | getInt (const vector< TableExprId > &=vector< TableExprId >()) |
virtual Double | getDouble (const vector< TableExprId > &=vector< TableExprId >()) |
virtual DComplex | getDComplex (const vector< TableExprId > &=vector< TableExprId >()) |
virtual MVTime | getDate (const vector< TableExprId > &=vector< TableExprId >()) |
virtual String | getString (const vector< TableExprId > &=vector< TableExprId >()) |
virtual MArray< Bool > | getArrayBool (const vector< TableExprId > &=vector< TableExprId >()) |
virtual MArray< Int64 > | getArrayInt (const vector< TableExprId > &=vector< TableExprId >()) |
virtual MArray< Double > | getArrayDouble (const vector< TableExprId > &=vector< TableExprId >()) |
virtual MArray< DComplex > | getArrayDComplex (const vector< TableExprId > &=vector< TableExprId >()) |
virtual MArray< MVTime > | getArrayDate (const vector< TableExprId > &=vector< TableExprId >()) |
virtual MArray< String > | getArrayString (const vector< TableExprId > &=vector< TableExprId >()) |
Protected Attributes | |
TableExprNodeRep * | itsNode |
TableExprNodeRep * | itsOperand |
uInt | itsSeqnr |
Private Member Functions | |
TableExprGroupFuncBase (const TableExprGroupFuncBase &) | |
Copying is not needed, thus not allowed. More... | |
TableExprGroupFuncBase & | operator= (const TableExprGroupFuncBase &) |
Abstract base class for classes calculating an aggregated group result.
Internal
The GROUPBY clause divides a table into groups for which aggregated results can be calculated like the mean or minimum. These results are calculated in classes derived from this abstract base class.
There is one such function object per aggregation per group. All aggregation objects of a group are combined in a std::vector. This vector is mapped to a TableExprGroupKeySet object to keep track of all groups and aggregations.
There are two types of aggregation function classes.
Most derived classes are immediate classes.
Definition at line 201 of file ExprGroup.h.
|
explicit |
Construct from the TaQL aggregation node.
It keeps the operand of the aggregation node.
|
virtual |
|
private |
Copying is not needed, thus not allowed.
|
pure virtual |
Get the operand's value for the given row and apply it to the aggregation.
This function should not be called for lazy classes.
Implemented in casacore::TableExprGroupHistDouble, casacore::TableExprGroupHistInt, casacore::TableExprGroupHistScalar, casacore::TableExprGroupVariancesArrayDComplex, casacore::TableExprGroupMeansArrayDComplex, casacore::TableExprGroupSumSqrsArrayDComplex, casacore::TableExprGroupProductsArrayDComplex, casacore::TableExprGroupSumsArrayDComplex, casacore::TableExprGroupRmssArrayDouble, casacore::TableExprGroupVariancesArrayDouble, casacore::TableExprGroupMeansArrayDouble, casacore::TableExprGroupSumSqrsArrayDouble, casacore::TableExprGroupProductsArrayDouble, casacore::TableExprGroupSumsArrayDouble, casacore::TableExprGroupMaxsArrayDouble, casacore::TableExprGroupMinsArrayDouble, casacore::TableExprGroupSumSqrsArrayInt, casacore::TableExprGroupProductsArrayInt, casacore::TableExprGroupSumsArrayInt, casacore::TableExprGroupMaxsArrayInt, casacore::TableExprGroupMinsArrayInt, casacore::TableExprGroupArrayNFalses, casacore::TableExprGroupArrayNTrues, casacore::TableExprGroupArrayAlls, casacore::TableExprGroupArrayAnys, casacore::TableExprGroupVarianceArrayDComplex, casacore::TableExprGroupMeanArrayDComplex, casacore::TableExprGroupSumSqrArrayDComplex, casacore::TableExprGroupProductArrayDComplex, casacore::TableExprGroupSumArrayDComplex, casacore::TableExprGroupFractileArrayDouble, casacore::TableExprGroupRmsArrayDouble, casacore::TableExprGroupVarianceArrayDouble, casacore::TableExprGroupMeanArrayDouble, casacore::TableExprGroupSumSqrArrayDouble, casacore::TableExprGroupProductArrayDouble, casacore::TableExprGroupSumArrayDouble, casacore::TableExprGroupMaxArrayDouble, casacore::TableExprGroupMinArrayDouble, casacore::TableExprGroupSumSqrArrayInt, casacore::TableExprGroupProductArrayInt, casacore::TableExprGroupSumArrayInt, casacore::TableExprGroupMaxArrayInt, casacore::TableExprGroupMinArrayInt, casacore::TableExprGroupArrayNFalse, casacore::TableExprGroupArrayNTrue, casacore::TableExprGroupArrayAll, casacore::TableExprGroupArrayAny, casacore::TableExprGroupVarianceDComplex, casacore::TableExprGroupMeanDComplex, casacore::TableExprGroupSumSqrDComplex, casacore::TableExprGroupProductDComplex, casacore::TableExprGroupSumDComplex, casacore::TableExprGroupFractileDouble, casacore::TableExprGroupRmsDouble, casacore::TableExprGroupVarianceDouble, casacore::TableExprGroupMeanDouble, casacore::TableExprGroupSumSqrDouble, casacore::TableExprGroupProductDouble, casacore::TableExprGroupSumDouble, casacore::TableExprGroupMaxDouble, casacore::TableExprGroupMinDouble, casacore::TableExprGroupSumSqrInt, casacore::TableExprGroupProductInt, casacore::TableExprGroupSumInt, casacore::TableExprGroupMaxInt, casacore::TableExprGroupMinInt, casacore::TableExprGroupNFalse, casacore::TableExprGroupNTrue, casacore::TableExprGroupAll, casacore::TableExprGroupAny, casacore::TableExprGroupCount, casacore::TableExprGroupCountAll, casacore::TableExprGroupAggr, casacore::TableExprGroupRowid, casacore::TableExprGroupExprId, casacore::TableExprGroupLast, casacore::TableExprGroupFirst, and casacore::TableExprGroupNull.
|
virtual |
If needed, finish the aggregation.
By default nothing is done.
Reimplemented in casacore::TableExprGroupStdDevsArrayDComplex, casacore::TableExprGroupVariancesArrayDComplex, casacore::TableExprGroupMeansArrayDComplex, casacore::TableExprGroupProductsArrayDComplex, casacore::TableExprGroupRmssArrayDouble, casacore::TableExprGroupStdDevsArrayDouble, casacore::TableExprGroupVariancesArrayDouble, casacore::TableExprGroupMeansArrayDouble, casacore::TableExprGroupProductsArrayDouble, casacore::TableExprGroupMaxsArrayDouble, casacore::TableExprGroupMinsArrayDouble, casacore::TableExprGroupProductsArrayInt, casacore::TableExprGroupMaxsArrayInt, casacore::TableExprGroupMinsArrayInt, casacore::TableExprGroupStdDevArrayDComplex, casacore::TableExprGroupVarianceArrayDComplex, casacore::TableExprGroupMeanArrayDComplex, casacore::TableExprGroupRmsArrayDouble, casacore::TableExprGroupStdDevArrayDouble, casacore::TableExprGroupVarianceArrayDouble, casacore::TableExprGroupMeanArrayDouble, casacore::TableExprGroupStdDevDComplex, casacore::TableExprGroupVarianceDComplex, casacore::TableExprGroupMeanDComplex, casacore::TableExprGroupRmsDouble, casacore::TableExprGroupStdDevDouble, casacore::TableExprGroupVarianceDouble, and casacore::TableExprGroupMeanDouble.
|
virtual |
Reimplemented in casacore::TableExprGroupFuncArrayBool, casacore::TableExprGroupAggr, and casacore::TableExprGroupFirst.
|
virtual |
Reimplemented in casacore::TableExprGroupFuncArrayDate, casacore::TableExprGroupAggr, and casacore::TableExprGroupFirst.
|
virtual |
Reimplemented in casacore::TableExprGroupFuncArrayDComplex, casacore::TableExprGroupAggr, and casacore::TableExprGroupFirst.
|
virtual |
Reimplemented in casacore::TableExprGroupFuncArrayDouble, casacore::TableExprGroupAggr, and casacore::TableExprGroupFirst.
|
virtual |
|
virtual |
Reimplemented in casacore::TableExprGroupFuncArrayString, casacore::TableExprGroupAggr, and casacore::TableExprGroupFirst.
|
virtual |
Get the aggregated value.
Immediate classes can return the already calculated value, while lazy classes will get the values of all rows given by the TableExprIds and do the aggregation.
Reimplemented in casacore::TableExprGroupFuncBool, and casacore::TableExprGroupFirst.
|
virtual |
Reimplemented in casacore::TableExprGroupFuncDate, and casacore::TableExprGroupFirst.
|
virtual |
Reimplemented in casacore::TableExprGroupFuncDComplex, and casacore::TableExprGroupFirst.
|
virtual |
|
virtual |
Get the assembled TableExprIds of a group.
It is specifically meant for TableExprGroupExprId used for lazy aggregation.
Reimplemented in casacore::TableExprGroupExprId.
|
virtual |
Reimplemented in casacore::TableExprGroupFuncInt, and casacore::TableExprGroupFirst.
|
virtual |
Reimplemented in casacore::TableExprGroupFuncString, and casacore::TableExprGroupFirst.
|
virtual |
Does the aggregate function use lazy semantics? The default implementation returns False.
Reimplemented in casacore::TableExprGroupFractileArrayDouble, casacore::TableExprGroupFractileDouble, casacore::TableExprGroupAggr, casacore::TableExprGroupRowid, casacore::TableExprGroupExprId, and casacore::TableExprGroupNull.
|
private |
|
inline |
Get the function's sequence nr.
Definition at line 212 of file ExprGroup.h.
References itsSeqnr.
Referenced by setSeqnr().
|
inline |
Set the function's sequence nr.
Definition at line 215 of file ExprGroup.h.
|
protected |
Definition at line 250 of file ExprGroup.h.
|
protected |
Definition at line 251 of file ExprGroup.h.
Referenced by casacore::TableExprGroupAggr::getArray().
|
protected |
Definition at line 252 of file ExprGroup.h.
Referenced by seqnr(), and setSeqnr().