Go to the documentation of this file.
28 #ifndef TABLES_EXPRFUNCNODE_H
29 #define TABLES_EXPRFUNCNODE_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/TaQL/ExprNodeRep.h>
34 #include <casacore/casa/Quanta/MVAngle.h>
39 class TableExprNodeSet;
351 const vector<TENShPtr>& nodes,
377 std::vector<TENShPtr>&);
407 const std::vector<TENShPtr>&
operands,
427 const std::pair<int,int>& mvFormat,
435 const std::pair<int,int>& mvFormat);
450 static double angdist (
double ra1,
double dec1,
double ra2,
double dec2)
for Int or Double array returning Double
LatticeExprNode acos(const LatticeExprNode &expr)
TableExprFuncNode(FunctionType, NodeDataType, ValueType, const TableExprNodeSet &source, const vector< TENShPtr > &nodes, const Block< Int > &dtypeOper, const Table &=Table())
Constructor.
for Bool array returning Bool
std::vector< TENShPtr > operands_p
ValueType
Define the value types.
Double getScale() const
Get possible unit scale factor (needed for sqrt).
for Int, Double, Bool or String returning Int (using floor)
special function returning Int row id (meant for GIVING)
MVTime getDate(const TableExprId &id)
std::complex< Double > DComplex
Class to handle date/time type conversions and I/O.
static double angdist(double ra1, double dec1, double ra2, double dec2)
Get the angular distance between two positions on a sphere.
static String stringDateTime(const MVTime &dt, Int prec)
static String stringDMS(double val, Int prec)
std::vector< TENShPtr > & rwOperands()
static Bool string2Bool(const String &)
cone search functions, implemented in derived class
Int64 getInt(const TableExprId &id)
for Int, Double or DComplex returning Double
for Double or DComplex returning Double
String getString(const TableExprId &id)
for any array returning Int array
const std::vector< TENShPtr > & operands() const
Some functions to be used by TableExprNodeFuncArray.
const Unit & unit() const
Get the unit.
void fillUnits()
Fill the result unit in the node.
for Int, Double, Complex or String returning Bool
DComplex getDComplex(const TableExprId &id)
special function returning Int row number
for any type returning array of that type
static String stringTime(const MVTime &dt, Int prec)
for Int, Double, DComplex, Bool or String returning Double
Class representing a function in table select expression.
for Int, Double or DComplex returning Int, Double or Complex
for Int, or Double or Complex returning Bool (2 is with default tolerance)
for Bool array returning Int scalar
special function resembling if statement
TaqlRegex getRegex(const TableExprId &id)
FunctionType funcType() const
Double getDouble(const TableExprId &id)
LatticeExprNode cos(const LatticeExprNode &expr)
Main interface class to a read/write table.
static const Unit & makeEqualUnits(std::vector< TENShPtr > &nodes, uInt starg, uInt endarg)
Make the units of nodes from starg till endarg equal.
for Int, Double or Complex returning Double or Complex
void tryToConst()
Try if the function gives a constant result.
for Int or Double returning Int or Double
for DComplex or String returning DComplex
LatticeExprNode sin(const LatticeExprNode &expr)
Numerical 1-argument functions.
for Int or Double array returning Int or Double
angular distance returning radians
Bool getBool(const TableExprId &id)
'get' Functions to get the desired result of a function
static DComplex string2Complex(const String &)
static String stringHMS(double val, Int prec)
for Int, Double or Complex array returning the same
this file contains all the compiler specific defines
return angles as hms strings
static Double string2Real(const String &)
static String stringValue(Bool val, const String &fmt, Int width)
Convert a value to a string.
The identification of a TaQL selection subject.
Class to hold multiple table expression nodes.
static std::pair< int, int > getMVFormat(const String &fmt)
Get the MVTime/Angle format and optional precision.
NodeDataType argDataType_p
normalize angle between -pi and pi
static String stringAngle(double val, Int prec, MVAngle::formatTypes type)
Convert angle to a string (hms or dms).
for Int, Double or DComplex array returning Bool
NodeDataType argDataType() const
Table table_p
(needed for sqrt)
for any array returning Int scalar
special function returning a random Double number
static Int64 string2Int(const String &)
Read a string as an integer, double, complex or bool.
NodeDataType
Define the data types of a node.
for Int, Double or DComplex returning Double or Complex
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
for Int, Double or DComplex returning Int or Double
static String stringDT(const MVTime &dt, Int prec, MVTime::formatTypes)
Convert the date and/or time to a string.
String: the storage and methods of handling collections of characters.
~TableExprFuncNode()
Destructor.
bool Bool
Define the standard types used by Casacore.
static NodeDataType checkOperands(Block< Int > &dtypeOper, ValueType &resVT, Block< Int > &vtypeOper, FunctionType, std::vector< TENShPtr > &)
Check the data and value types of the operands.
static void getPrintFormat(String &fmt, Int &width, Int &prec, const std::vector< TENShPtr > &operands, const TableExprId &id)
Get the possible print format, width, and/or precision.
void fillChildNodes(const vector< TENShPtr > &nodes, const Block< Int > &dtypeOper)
Link the children to the node and convert the children to constants if possible.
return angles as hms/dms strings
for any array returning Bool scalar
static String stringDate(const MVTime &dt)
Abstract base class for a node having multiple child nodes.
Class to handle a Regex or StringDistance.
return angles as dms strings