casacore
Public Member Functions | List of all members
casacore::TabVecMath_global_functions_miscellaneous Struct Reference

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. More...
 
template<class T >
min (const TableVector< T > &)
 The minimum element of the table vector. More...
 
template<class T >
max (const TableVector< T > &)
 The maximum element of the table vector. More...
 
template<class T >
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" for each element. More...
 
template<class T >
void indgen (TableVector< T > &, T start)
 Fills all elements of the table vector with a sequence starting with "start" incremented by one for each position in the table vector. More...
 
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. More...
 
template<class T >
sum (const TableVector< T > &)
 Sum of all the elements of a table vector. More...
 
template<class T >
product (const TableVector< T > &)
 Product of all the elements of a table vector. More...
 

Detailed Description

Miscellaneous table vector operations.

Intended use:

Public interface

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Synopsis

Fill a table vector or calculate the sum, product, minimum or maximum of its elements.


Definition at line 231 of file TabVecMath.h.

Member Function Documentation

◆ indgen() [1/3]

template<class T >
void casacore::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.

◆ indgen() [2/3]

template<class T >
void casacore::TabVecMath_global_functions_miscellaneous::indgen ( TableVector< T > &  ,
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.

◆ indgen() [3/3]

template<class T >
void casacore::TabVecMath_global_functions_miscellaneous::indgen ( TableVector< T > &  ,
start,
inc 
)
inline

Fills all elements of the table vector with a sequence starting with "start" and incrementing by "inc" for each element.

◆ max()

template<class T >
T casacore::TabVecMath_global_functions_miscellaneous::max ( const TableVector< T > &  )
inline

The maximum element of the table vector.

Requires that the type "T" has comparison operators.

◆ min()

template<class T >
T casacore::TabVecMath_global_functions_miscellaneous::min ( const TableVector< T > &  )
inline

The minimum element of the table vector.

Requires that the type "T" has comparison operators.

◆ minMax()

template<class T >
void casacore::TabVecMath_global_functions_miscellaneous::minMax ( T &  min,
T &  max,
const TableVector< T > &   
)
inline

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.

Requires that the type "T" has comparison operators.

◆ product()

template<class T >
T casacore::TabVecMath_global_functions_miscellaneous::product ( const TableVector< T > &  )
inline

Product of all the elements of a table vector.


Warning: product can easily overflow;

◆ sum()

template<class T >
T casacore::TabVecMath_global_functions_miscellaneous::sum ( const TableVector< T > &  )
inline

Sum of all the elements of a table vector.


The documentation for this struct was generated from the following file: