casacore
Loading...
Searching...
No Matches
Public Member Functions | List of all members
casacore::STLMath_global_functions_Container_Math Struct Reference

More...

#include <STLMath.h>

Public Member Functions

void throwContainerSizes (const char *name, size_t l1, size_t l2)
 Throw an exception that two container sizes mismatch.
 
template<typename CONTAINER >
void checkContainerSizes (const CONTAINER &left, const CONTAINER &right, const char *name)
 Check if the sizes of both containers are the same.
 
template<typename CONTAINER >
CONTAINER reversedCasaContainer (const CONTAINER &in)
 Reverse a Casacore container like IPosition, Block, or Vector.
 
template<class T >
std::vector< T > operator+ (const std::vector< T > &left, const std::vector< T > &right)
 Add two std::vector objects.
 
template<class T >
std::vector< T > operator/ (const std::vector< T > &left, const T &right)
 Divide a vector by a scalar.
 

Detailed Description

Math operations on STL-like containers

Intended use:

Public interface

Review Status

Reviewed By:
Paul Shannon
Date Reviewed:
1995/02/21

Prerequisite

Synopsis

This file defines a few functions with a math operation on a vector. Others can be added later.


Definition at line 56 of file STLMath.h.

Member Function Documentation

◆ checkContainerSizes()

template<typename CONTAINER >
void casacore::STLMath_global_functions_Container_Math::checkContainerSizes ( const CONTAINER &  left,
const CONTAINER &  right,
const char *  name 
)
inline

Check if the sizes of both containers are the same.

Definition at line 62 of file STLMath.h.

References throwContainerSizes().

Referenced by operator+().

◆ operator+()

template<class T >
std::vector< T > casacore::STLMath_global_functions_Container_Math::operator+ ( const std::vector< T > &  left,
const std::vector< T > &  right 
)
inline

Add two std::vector objects.

Definition at line 84 of file STLMath.h.

References checkContainerSizes().

◆ operator/()

template<class T >
std::vector< T > casacore::STLMath_global_functions_Container_Math::operator/ ( const std::vector< T > &  left,
const T &  right 
)
inline

Divide a vector by a scalar.

Definition at line 96 of file STLMath.h.

◆ reversedCasaContainer()

template<typename CONTAINER >
CONTAINER casacore::STLMath_global_functions_Container_Math::reversedCasaContainer ( const CONTAINER &  in)
inline

Reverse a Casacore container like IPosition, Block, or Vector.

Definition at line 72 of file STLMath.h.

◆ throwContainerSizes()

void casacore::STLMath_global_functions_Container_Math::throwContainerSizes ( const char *  name,
size_t  l1,
size_t  l2 
)

Throw an exception that two container sizes mismatch.

Referenced by checkContainerSizes().


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