casacore
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

◆ compareAll()

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.

◆ compareAllLeft()

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.

◆ compareAllRight()

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.

◆ compareAny()

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.

◆ compareAnyLeft()

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.

◆ compareAnyRight()

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.

◆ convertScalar() [1/2]

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

Definition at line 295 of file ElementFunctions.h.

◆ convertScalar() [2/2]

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

Definition at line 292 of file ElementFunctions.h.

◆ floormod() [1/4]

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

Definition at line 285 of file ElementFunctions.h.

References casacore::fmod().

◆ floormod() [2/4]

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

Definition at line 279 of file ElementFunctions.h.

References casacore::fmod().

◆ floormod() [3/4]

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

Definition at line 267 of file ElementFunctions.h.

Referenced by casacore::FloorMod< L, R, RES >::operator()().

◆ floormod() [4/4]

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

Definition at line 273 of file ElementFunctions.h.

◆ isfinite()

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

◆ isinf()

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

Definition at line 256 of file ElementFunctions.h.

◆ isnan()

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

◆ near() [1/8]

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().

◆ near() [2/8]

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().

◆ near() [3/8]

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().

◆ near() [4/8]

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

Definition at line 81 of file ElementFunctions.h.

References near().

◆ near() [5/8]

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

Definition at line 77 of file ElementFunctions.h.

References near().

◆ near() [6/8]

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().

◆ near() [7/8]

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().

◆ near() [8/8]

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().

◆ nearAbs() [1/6]

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().

◆ nearAbs() [2/6]

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().

◆ nearAbs() [3/6]

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

Definition at line 137 of file ElementFunctions.h.

References casacore::abs().

◆ nearAbs() [4/6]

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

Definition at line 133 of file ElementFunctions.h.

References casacore::abs().

◆ nearAbs() [5/6]

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

Definition at line 129 of file ElementFunctions.h.

References casacore::abs().

◆ nearAbs() [6/6]

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

Definition at line 119 of file ElementFunctions.h.