28 #ifndef TABLES_TABVECMATH_H
29 #define TABLES_TABVECMATH_H
35 #include <casacore/casa/aips.h>
36 #include <casacore/casa/BasicMath/Math.h>
37 #include <casacore/tables/Tables/TableVector.h>
38 #include <casacore/tables/Tables/TVecMath.h>
62 template<
class T>
inline
65 template<
class T>
inline
68 template<
class T>
inline
71 template<
class T>
inline
75 template<
class T>
inline
78 template<
class T>
inline
81 template<
class T>
inline
84 template<
class T>
inline
88 template<
class T>
inline
91 template<
class T>
inline
95 template<
class T>
inline
99 template<
class T>
inline
103 template<
class T>
inline
107 template<
class T>
inline
113 template<
class T>
inline
117 template<
class T>
inline
121 template<
class T>
inline
125 template<
class T>
inline
130 template<
class T>
inline
134 template<
class T>
inline
138 template<
class T>
inline
142 template<
class T>
inline
209 const double& exponent);
234 template<
class T>
inline
239 template<
class T>
inline
244 template<
class T>
inline
249 template<
class T>
inline
254 template<
class T>
inline
259 template<
class T>
inline
263 template<
class T>
inline
270 template<
class T>
inline T
293 template<
class T>
inline
298 template<
class T>
inline
302 template<
class T>
inline
315 #define TABVECMATHOPER(NAME,OP,OPA) \
316 template<class T> inline \
317 TableVector<T> aips_name2(operato,OP) (const TableVector<T>& tv, \
319 { return TableVector<T> (aips_name2(tabVecRepvalr,NAME) (tv.tabVec(), \
321 template<class T> inline \
322 TableVector<T> aips_name2(operato,OP) (const T& v, \
323 const TableVector<T>& tv) \
324 { return TableVector<T> (aips_name2(tabVecRepvall,NAME) (v, \
326 template<class T> inline \
327 TableVector<T> aips_name2(operato,OP) (const TableVector<T>& l, \
328 const TableVector<T>& r) \
329 { return TableVector<T> (aips_name2(tabVecReptv,NAME) (l.tabVec(), \
331 template<class T> inline \
332 void aips_name2(operato,OPA) (TableVector<T>& tv, const T& v) \
333 { aips_name2(tabVecRepvalass,NAME) (tv.tabVec(), v); } \
334 template<class T> inline \
335 void aips_name2(operato,OPA) (TableVector<T>& l, \
336 const TableVector<T>& r) \
337 { aips_name2(tabVecReptvass,NAME) (l.tabVec(), r.tabVec()); }
345 #define TABVECMATHFUNC(NAME) \
346 template<class T> inline \
347 TableVector<T> NAME (const TableVector<T>& tv) \
348 { return TableVector<T> (aips_name2(tabVecRep,NAME) (tv.tabVec())); }
349 #define TABVECMATHFUNC2(NAME) \
350 template<class T> inline \
351 TableVector<T> NAME (const TableVector<T>& l, \
352 const TableVector<T>& r) \
353 { return TableVector<T> (aips_name2(tabVecRep,NAME) (l.tabVec(), \
376 template<
class T>
inline
381 template<
class T>
inline
383 {
return tabVecRepsum (tv.
tabVec()); }
384 template<
class T>
inline
386 {
return tabVecRepproduct (tv.
tabVec()); }
389 template<
class T>
inline
392 template<
class T>
inline
395 template<
class T>
inline
399 template<
class T>
inline
401 { tabVecRepindgen (tv.
tabVec(), start, inc); }
402 template<
class T>
inline
404 { tabVecRepindgen (tv.
tabVec(), start, T(1)); }
405 template<
class T>
inline
407 { tabVecRepindgen (tv.
tabVec(), T(0), T(1)); }
410 template<
class T>
inline
412 {
return tabVecRepinnerproduct (l.
tabVec(), r.
tabVec()); }
413 template<
class T>
inline
415 {
return tabVecRepnorm (tv.
tabVec()); }
416 template<
class T>
inline
#define TABVECMATHFUNC(NAME)
#define TABVECMATHOPER(NAME, OP, OPA)
#define TABVECMATHFUNC2(NAME)
TabVecRep< T > & tabVec()
Return the TabVecRep reference.
this file contains all the compiler specific defines
LatticeExprNode exp(const LatticeExprNode &expr)
LatticeExprNode asin(const LatticeExprNode &expr)
void minMax(T &min, T &max, const TableVector< T > &tv)
LatticeExprNode fmod(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode acos(const LatticeExprNode &expr)
T innerProduct(const TableVector< T > &l, const TableVector< T > &r)
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
void indgen(TableVector< T > &tv, T start, T inc)
LatticeExprNode cosh(const LatticeExprNode &expr)
LatticeExprNode atan(const LatticeExprNode &expr)
LatticeExprNode tanh(const LatticeExprNode &expr)
LatticeExprNode log10(const LatticeExprNode &expr)
LatticeExprNode sinh(const LatticeExprNode &expr)
LatticeExprNode sum(const LatticeExprNode &expr)
LatticeExprNode operator+(const LatticeExprNode &expr)
Global functions operating on a LatticeExprNode.
TableVector< T > crossProduct(const TableVector< T > &l, const TableVector< T > &r)
MVBaseline operator*(const RotMatrix &left, const MVBaseline &right)
Rotate a Baseline vector with rotation matrix and other multiplications.
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
T norm(const TableVector< T > &tv)
LatticeExprNode operator-(const LatticeExprNode &expr)
LatticeExprNode tan(const LatticeExprNode &expr)
LatticeExprNode sin(const LatticeExprNode &expr)
Numerical 1-argument functions.
LatticeExprNode operator/(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode atan2(const LatticeExprNode &left, const LatticeExprNode &right)
Numerical 2-argument functions.
LatticeExprNode sqrt(const LatticeExprNode &expr)
T product(const TableVector< T > &tv)
LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode log(const LatticeExprNode &expr)
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
LatticeExprNode cos(const LatticeExprNode &expr)
LatticeExprNode floor(const LatticeExprNode &expr)
LatticeExprNode ceil(const LatticeExprNode &expr)
Functor to get maximum of two values.
Functor to get minimum of two values.
T sum(const TableVector< T > &)
Sum of all the elements of a table vector.
void indgen(TableVector< T > &, T start)
Fills all elements of the table vector with a sequence starting with "start" incremented by one for e...
void indgen(TableVector< T > &, T start, T inc)
Fills all elements of the table vector with a sequence starting with "start" and incrementing by "inc...
T min(const TableVector< T > &)
The minimum element of the table vector.
T max(const TableVector< T > &)
The maximum element of the table vector.
void indgen(TableVector< T > &)
Fills all elements of the table vector with a sequence starting with 0 and ending with nelements() - ...
T product(const TableVector< T > &)
Product of all the elements of a table vector.
T norm(const TableVector< T > &)
The norm of a table vector.
TableVector< T > crossProduct(const TableVector< T > &left, const TableVector< T > &right)
The cross product of 2 table vectors containing 3 elements.