casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
casacore::arrays_internal Namespace Reference

Classes

struct  SumSqrDiff
 Functor to add squared diff of right and base value to left. More...
 
struct  SumSqrDiff< std::complex< T > >
 Specialize for complex values. More...
 
class  Storage
 This class emplements a static (but run-time) sized array. More...
 

Functions

bool near (unsigned val1, unsigned val2, double tol)
 
bool near (int val1, int val2, double tol)
 
bool near (float val1, float val2, double tol)
 
bool near (double val1, double val2, double tol)
 
bool near (float val1, double val2, double tol)
 
bool near (double val1, float val2, double tol)
 
bool near (const std::complex< float > &val1, const std::complex< float > &val2, double tol=1.0e-5)
 
bool near (const std::complex< double > &val1, const std::complex< double > &val2, double tol=1.0e-13)
 
bool nearAbs (const std::complex< float > &val1, const std::complex< float > &val2, double tol=1.0e-5)
 
bool nearAbs (const std::complex< double > &val1, const std::complex< double > &val2, double tol=1.0e-13)
 
bool nearAbs (unsigned val1, unsigned val2, double tol)
 
bool nearAbs (int val1, int val2, double tol)
 
bool nearAbs (float val1, float val2, double tol)
 
bool nearAbs (double val1, double val2, double tol)
 
template<typename InputIterator1 , typename InputIterator2 , typename CompareOperator >
bool compareAll (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, CompareOperator op)
 Define a function to compare all elements of two sequences. More...
 
template<typename InputIterator1 , typename T , typename CompareOperator >
bool compareAllLeft (InputIterator1 first1, InputIterator1 last1, T left, CompareOperator op)
 For use with a constant left value. More...
 
template<typename InputIterator1 , typename T , typename CompareOperator >
bool compareAllRight (InputIterator1 first1, InputIterator1 last1, T right, CompareOperator op)
 For use with a constant right value. More...
 
template<typename InputIterator1 , typename InputIterator2 , typename CompareOperator >
bool compareAny (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, CompareOperator op)
 Define a function to compare all elements of two sequences. More...
 
template<typename InputIterator1 , typename T , typename CompareOperator >
bool compareAnyLeft (InputIterator1 first1, InputIterator1 last1, T left, CompareOperator op)
 For use with a constant left value. More...
 
template<typename InputIterator1 , typename T , typename CompareOperator >
bool compareAnyRight (InputIterator1 first1, InputIterator1 last1, T right, CompareOperator op)
 For use with a constant right value. More...
 
template<typename T >
bool isnan (const std::complex< T > &val)
 
template<typename T >
bool isinf (const std::complex< T > &val)
 
template<typename T >
bool isfinite (const std::complex< T > &val)
 
int floormod (int x, int y)
 
long long floormod (long long x, long long y)
 
float floormod (float x, float y)
 
double floormod (double x, double y)
 
template<class T , class F >
void convertScalar (T &out, F in)
 
void convertScalar (std::complex< float > &out, std::complex< double > in)
 

Function Documentation

template<typename InputIterator1 , typename InputIterator2 , typename CompareOperator >
bool casacore::arrays_internal::compareAll ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
CompareOperator  op 
)
inline

Define a function to compare all elements of two sequences.

It returns true if all elements compare true. An example compare operator is std::equal_to.

Definition at line 146 of file ElementFunctions.h.

template<typename InputIterator1 , typename T , typename CompareOperator >
bool casacore::arrays_internal::compareAllLeft ( InputIterator1  first1,
InputIterator1  last1,
left,
CompareOperator  op 
)
inline

For use with a constant left value.

This avoids use of bind1st or bind2nd which can fail for gcc-4.3. (see ArrayMath.h).

Definition at line 158 of file ElementFunctions.h.

template<typename InputIterator1 , typename T , typename CompareOperator >
bool casacore::arrays_internal::compareAllRight ( InputIterator1  first1,
InputIterator1  last1,
right,
CompareOperator  op 
)
inline

For use with a constant right value.

This avoids use of bind1st or bind2nd which can fail for gcc-4.3. (see ArrayMath.h).

Definition at line 170 of file ElementFunctions.h.

template<typename InputIterator1 , typename InputIterator2 , typename CompareOperator >
bool casacore::arrays_internal::compareAny ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
CompareOperator  op 
)
inline

Define a function to compare all elements of two sequences.

It returns true if any element compares true. An example compare operator is std::equal_to.

Definition at line 185 of file ElementFunctions.h.

template<typename InputIterator1 , typename T , typename CompareOperator >
bool casacore::arrays_internal::compareAnyLeft ( InputIterator1  first1,
InputIterator1  last1,
left,
CompareOperator  op 
)
inline

For use with a constant left value.

This avoids use of bind1st or bind2nd which can fail for gcc-4.3. (see ArrayMath.h).

Definition at line 197 of file ElementFunctions.h.

template<typename InputIterator1 , typename T , typename CompareOperator >
bool casacore::arrays_internal::compareAnyRight ( InputIterator1  first1,
InputIterator1  last1,
right,
CompareOperator  op 
)
inline

For use with a constant right value.

This avoids use of bind1st or bind2nd which can fail for gcc-4.3. (see ArrayMath.h).

Definition at line 209 of file ElementFunctions.h.

template<class T , class F >
void casacore::arrays_internal::convertScalar ( T &  out,
in 
)
inline

Definition at line 292 of file ElementFunctions.h.

void casacore::arrays_internal::convertScalar ( std::complex< float > &  out,
std::complex< double >  in 
)
inline

Definition at line 295 of file ElementFunctions.h.

int casacore::arrays_internal::floormod ( int  x,
int  y 
)
inline
long long casacore::arrays_internal::floormod ( long long  x,
long long  y 
)
inline

Definition at line 273 of file ElementFunctions.h.

float casacore::arrays_internal::floormod ( float  x,
float  y 
)
inline

Definition at line 279 of file ElementFunctions.h.

References casacore::fmod().

double casacore::arrays_internal::floormod ( double  x,
double  y 
)
inline

Definition at line 285 of file ElementFunctions.h.

References casacore::fmod().

template<typename T >
bool casacore::arrays_internal::isfinite ( const std::complex< T > &  val)
template<typename T >
bool casacore::arrays_internal::isinf ( const std::complex< T > &  val)

Definition at line 256 of file ElementFunctions.h.

template<typename T >
bool casacore::arrays_internal::isnan ( const std::complex< T > &  val)
bool casacore::arrays_internal::near ( unsigned  val1,
unsigned  val2,
double  tol 
)
inline

Definition at line 11 of file ElementFunctions.h.

References casacore::max().

Referenced by near().

bool casacore::arrays_internal::near ( int  val1,
int  val2,
double  tol 
)
inline

Definition at line 24 of file ElementFunctions.h.

References casacore::abs(), and casacore::max().

bool casacore::arrays_internal::near ( float  val1,
float  val2,
double  tol 
)
inline

Definition at line 39 of file ElementFunctions.h.

References casacore::abs(), casacore::max(), and casacore::min().

bool casacore::arrays_internal::near ( double  val1,
double  val2,
double  tol 
)
inline

Definition at line 58 of file ElementFunctions.h.

References casacore::abs(), casacore::max(), and casacore::min().

bool casacore::arrays_internal::near ( float  val1,
double  val2,
double  tol 
)
inline

Definition at line 77 of file ElementFunctions.h.

References near().

bool casacore::arrays_internal::near ( double  val1,
float  val2,
double  tol 
)
inline

Definition at line 81 of file ElementFunctions.h.

References near().

bool casacore::arrays_internal::near ( const std::complex< float > &  val1,
const std::complex< float > &  val2,
double  tol = 1.0e-5 
)
inline

Definition at line 85 of file ElementFunctions.h.

References casacore::abs(), casacore::min(), and near().

bool casacore::arrays_internal::near ( const std::complex< double > &  val1,
const std::complex< double > &  val2,
double  tol = 1.0e-13 
)
inline

Definition at line 99 of file ElementFunctions.h.

References casacore::abs(), and casacore::min().

bool casacore::arrays_internal::nearAbs ( const std::complex< float > &  val1,
const std::complex< float > &  val2,
double  tol = 1.0e-5 
)
inline

Definition at line 109 of file ElementFunctions.h.

References casacore::abs().

bool casacore::arrays_internal::nearAbs ( const std::complex< double > &  val1,
const std::complex< double > &  val2,
double  tol = 1.0e-13 
)
inline

Definition at line 114 of file ElementFunctions.h.

References casacore::abs().

bool casacore::arrays_internal::nearAbs ( unsigned  val1,
unsigned  val2,
double  tol 
)
inline

Definition at line 119 of file ElementFunctions.h.

bool casacore::arrays_internal::nearAbs ( int  val1,
int  val2,
double  tol 
)
inline

Definition at line 129 of file ElementFunctions.h.

References casacore::abs().

bool casacore::arrays_internal::nearAbs ( float  val1,
float  val2,
double  tol 
)
inline

Definition at line 133 of file ElementFunctions.h.

References casacore::abs().

bool casacore::arrays_internal::nearAbs ( double  val1,
double  val2,
double  tol 
)
inline

Definition at line 137 of file ElementFunctions.h.

References casacore::abs().