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