Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1TableExprFuncNodeArray.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 23:39:34 2011 Кодировка: Поисковые слова: р р р с р с р р р с р с р р р с с р р с р с р р п п р п п п п |
Class representing an array function in table select expression. More...
#include <ExprFuncNodeArray.h>
Public Member Functions | |
TableExprFuncNodeArray (TableExprFuncNode::FunctionType, NodeDataType, ValueType, const TableExprNodeSet &source, const TaQLStyle &) | |
Constructor. | |
~TableExprFuncNodeArray () | |
Destructor. | |
virtual Array< Bool > | getArrayBool (const TableExprId &id) |
'get' Functions to get the desired result of a function | |
virtual Array< Int64 > | getArrayInt (const TableExprId &id) |
virtual Array< Double > | getArrayDouble (const TableExprId &id) |
virtual Array< DComplex > | getArrayDComplex (const TableExprId &id) |
The default implementation of getArrayDComplex does getArrayDouble and converts the result. | |
virtual Array< String > | getArrayString (const TableExprId &id) |
virtual Array< MVTime > | getArrayDate (const TableExprId &id) |
const TableExprFuncNode * | getChild () const |
Get the function node. | |
Static Public Member Functions | |
static TableExprNodeRep * | fillNode (TableExprFuncNodeArray *thisNode, PtrBlock< TableExprNodeRep * > &nodes, const Block< Int > &dtypeOper) |
Link the children to the node and convert the children to constants if possible. | |
Private Member Functions | |
void | tryToConst () |
Try if the function gives a constant result. | |
const PtrBlock < TableExprNodeRep * > & | operands () const |
Some functions to be used by TableExprNodeFuncArray. | |
PtrBlock< TableExprNodeRep * > & | rwOperands () |
TableExprFuncNode::FunctionType | funcType () const |
NodeDataType | argDataType () const |
void | setScale (Double scale) |
Set unit scale factor (needed for sqrt). | |
const IPosition & | getCollapseAxes (const TableExprId &id, Int ndim, uInt axarg=1) |
Get the collapseAxes for the partial functions. | |
const IPosition & | getArrayShape (const TableExprId &id, uInt axarg=1) |
Get the shape for the array function. | |
Private Attributes | |
TableExprFuncNode | node_p |
Int | origin_p |
Bool | isCOrder_p |
Bool | constAxes_p |
IPosition | ipos_p |
IPosition | iposN_p |
IPosition | corrCollAxes_p |
uInt | lastNdim_p |
Class representing an array function in table select expression.
Internal
This class can be seen as a specialization of TableExprFuncNode for functions returning arrays. However, it is derived from TableExprNodeArray to make it possible that the ExprNode classes use all array functionality offered by that base class.
Internally an TableExprFuncNode object is used.
When a TaQL function is used, TableExprFuncNode::checkOperands determines whether the result is a scalar or an array. Thereafter TableExprNode::newFunctionNode creates a TableExprFuncNode for scalars or a TableExprFuncNodeArray for arrays.
Definition at line 69 of file ExprFuncNodeArray.h.
casa::TableExprFuncNodeArray::TableExprFuncNodeArray | ( | TableExprFuncNode::FunctionType | , | |
NodeDataType | , | |||
ValueType | , | |||
const TableExprNodeSet & | source, | |||
const TaQLStyle & | ||||
) |
Constructor.
casa::TableExprFuncNodeArray::~TableExprFuncNodeArray | ( | ) |
Destructor.
NodeDataType casa::TableExprFuncNodeArray::argDataType | ( | ) | const [inline, private] |
Definition at line 115 of file ExprFuncNodeArray.h.
References casa::TableExprFuncNode::argDataType(), and node_p.
static TableExprNodeRep* casa::TableExprFuncNodeArray::fillNode | ( | TableExprFuncNodeArray * | thisNode, | |
PtrBlock< TableExprNodeRep * > & | nodes, | |||
const Block< Int > & | dtypeOper | |||
) | [static] |
Link the children to the node and convert the children to constants if possible.
Also convert the node to constant if possible.
TableExprFuncNode::FunctionType casa::TableExprFuncNodeArray::funcType | ( | ) | const [inline, private] |
Definition at line 113 of file ExprFuncNodeArray.h.
References casa::TableExprFuncNode::funcType(), and node_p.
virtual Array<Bool> casa::TableExprFuncNodeArray::getArrayBool | ( | const TableExprId & | id | ) | [virtual] |
'get' Functions to get the desired result of a function
Reimplemented from casa::TableExprNodeRep.
virtual Array<MVTime> casa::TableExprFuncNodeArray::getArrayDate | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
virtual Array<DComplex> casa::TableExprFuncNodeArray::getArrayDComplex | ( | const TableExprId & | id | ) | [virtual] |
The default implementation of getArrayDComplex does getArrayDouble and converts the result.
Reimplemented from casa::TableExprNodeArray.
virtual Array<Double> casa::TableExprFuncNodeArray::getArrayDouble | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
virtual Array<Int64> casa::TableExprFuncNodeArray::getArrayInt | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
const IPosition& casa::TableExprFuncNodeArray::getArrayShape | ( | const TableExprId & | id, | |
uInt | axarg = 1 | |||
) | [private] |
Get the shape for the array function.
axarg gives the argument nr of the shape.
virtual Array<String> casa::TableExprFuncNodeArray::getArrayString | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
const TableExprFuncNode* casa::TableExprFuncNodeArray::getChild | ( | ) | const [inline] |
const IPosition& casa::TableExprFuncNodeArray::getCollapseAxes | ( | const TableExprId & | id, | |
Int | ndim, | |||
uInt | axarg = 1 | |||
) | [private] |
Get the collapseAxes for the partial functions.
It compares the values with the #dim and removes them if too high. axarg gives the argument nr of the axes.
const PtrBlock<TableExprNodeRep*>& casa::TableExprFuncNodeArray::operands | ( | ) | const [inline, private] |
Some functions to be used by TableExprNodeFuncArray.
Definition at line 109 of file ExprFuncNodeArray.h.
References node_p, and casa::TableExprFuncNode::operands().
PtrBlock<TableExprNodeRep*>& casa::TableExprFuncNodeArray::rwOperands | ( | ) | [inline, private] |
Definition at line 111 of file ExprFuncNodeArray.h.
References node_p, and casa::TableExprFuncNode::rwOperands().
void casa::TableExprFuncNodeArray::setScale | ( | Double | scale | ) | [inline, private] |
Set unit scale factor (needed for sqrt).
Definition at line 120 of file ExprFuncNodeArray.h.
References node_p, and casa::TableExprFuncNode::setScale().
void casa::TableExprFuncNodeArray::tryToConst | ( | ) | [private] |
Try if the function gives a constant result.
If so, set the expression type to Constant.
Definition at line 136 of file ExprFuncNodeArray.h.
Definition at line 139 of file ExprFuncNodeArray.h.
Definition at line 137 of file ExprFuncNodeArray.h.
Definition at line 138 of file ExprFuncNodeArray.h.
Bool casa::TableExprFuncNodeArray::isCOrder_p [private] |
Definition at line 135 of file ExprFuncNodeArray.h.
uInt casa::TableExprFuncNodeArray::lastNdim_p [private] |
Definition at line 141 of file ExprFuncNodeArray.h.
Definition at line 133 of file ExprFuncNodeArray.h.
Referenced by argDataType(), funcType(), getChild(), operands(), rwOperands(), and setScale().
Int casa::TableExprFuncNodeArray::origin_p [private] |
Definition at line 134 of file ExprFuncNodeArray.h.