casa
$Rev:20696$
|
Miscellaneous table vector operations. More...
#include <TabVecMath.h>
Public Member Functions | |
template<class T > | |
void | minMax (T &min, T &max, const TableVector< T > &) |
This sets min and max to the min and max of the vector to avoid having to do two passes with max() and min() separately. | |
template<class T > | |
T | min (const TableVector< T > &) |
The minimum element of the table vector. | |
template<class T > | |
T | max (const TableVector< T > &) |
The maximum element of the table vector. | |
template<class T > | |
void | indgen (TableVector< T > &, Int start, Int inc) |
Fills all elements of the table vector with a sequence starting with "start" and incrementing by "inc" for each element. | |
template<class T > | |
void | indgen (TableVector< T > &, Int start) |
Fills all elements of the table vector with a sequence starting with "start" incremented by one for each position in the table vector. | |
template<class T > | |
void | indgen (TableVector< T > &) |
Fills all elements of the table vector with a sequence starting with 0 and ending with nelements() - 1. | |
template<class T > | |
T | sum (const TableVector< T > &) |
Sum of all the elements of a table vector. | |
template<class T > | |
T | product (const TableVector< T > &) |
Product of all the elements of a table vector. |
Miscellaneous table vector operations.
Public interface
Fill a table vector or calculate the sum, product, minimum or maximum of its elements.
Definition at line 231 of file TabVecMath.h.
void casa::TabVecMath_global_functions_miscellaneous::indgen | ( | TableVector< T > & | , |
Int | start, | ||
Int | inc | ||
) | [inline] |
Fills all elements of the table vector with a sequence starting with "start" and incrementing by "inc" for each element.
void casa::TabVecMath_global_functions_miscellaneous::indgen | ( | TableVector< T > & | , |
Int | start | ||
) | [inline] |
Fills all elements of the table vector with a sequence starting with "start" incremented by one for each position in the table vector.
void casa::TabVecMath_global_functions_miscellaneous::indgen | ( | TableVector< T > & | ) | [inline] |
Fills all elements of the table vector with a sequence starting with 0 and ending with nelements() - 1.
T casa::TabVecMath_global_functions_miscellaneous::max | ( | const TableVector< T > & | ) | [inline] |
The maximum element of the table vector.
Requires that the type "T" has comparison operators.
T casa::TabVecMath_global_functions_miscellaneous::min | ( | const TableVector< T > & | ) | [inline] |
The minimum element of the table vector.
Requires that the type "T" has comparison operators.
void casa::TabVecMath_global_functions_miscellaneous::minMax | ( | T & | min, |
T & | max, | ||
const TableVector< T > & | |||
) | [inline] |
T casa::TabVecMath_global_functions_miscellaneous::product | ( | const TableVector< T > & | ) | [inline] |
Product of all the elements of a table vector.
Warning: product can easily overflow;
T casa::TabVecMath_global_functions_miscellaneous::sum | ( | const TableVector< T > & | ) | [inline] |
Sum of all the elements of a table vector.