casacore
Loading...
Searching...
No Matches
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.
template<typename InputIterator1, typename T, typename CompareOperator>
bool compareAllLeft (InputIterator1 first1, InputIterator1 last1, T left, CompareOperator op)
 For use with a constant left value.
template<typename InputIterator1, typename T, typename CompareOperator>
bool compareAllRight (InputIterator1 first1, InputIterator1 last1, T right, CompareOperator op)
 For use with a constant right value.
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.
template<typename InputIterator1, typename T, typename CompareOperator>
bool compareAnyLeft (InputIterator1 first1, InputIterator1 last1, T left, CompareOperator op)
 For use with a constant left value.
template<typename InputIterator1, typename T, typename CompareOperator>
bool compareAnyRight (InputIterator1 first1, InputIterator1 last1, T right, CompareOperator op)
 For use with a constant right value.
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 141 of file ElementFunctions.h.

◆ compareAllLeft()

template<typename InputIterator1, typename T, typename CompareOperator>
bool casacore::arrays_internal::compareAllLeft ( InputIterator1 first1,
InputIterator1 last1,
T 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 152 of file ElementFunctions.h.

◆ compareAllRight()

template<typename InputIterator1, typename T, typename CompareOperator>
bool casacore::arrays_internal::compareAllRight ( InputIterator1 first1,
InputIterator1 last1,
T 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 163 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 177 of file ElementFunctions.h.

◆ compareAnyLeft()

template<typename InputIterator1, typename T, typename CompareOperator>
bool casacore::arrays_internal::compareAnyLeft ( InputIterator1 first1,
InputIterator1 last1,
T 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 188 of file ElementFunctions.h.

◆ compareAnyRight()

template<typename InputIterator1, typename T, typename CompareOperator>
bool casacore::arrays_internal::compareAnyRight ( InputIterator1 first1,
InputIterator1 last1,
T 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 199 of file ElementFunctions.h.

◆ convertScalar() [1/2]

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

Definition at line 281 of file ElementFunctions.h.

◆ convertScalar() [2/2]

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

Definition at line 277 of file ElementFunctions.h.

◆ floormod() [1/4]

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

Definition at line 270 of file ElementFunctions.h.

◆ floormod() [2/4]

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

Definition at line 265 of file ElementFunctions.h.

◆ floormod() [3/4]

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

Definition at line 255 of file ElementFunctions.h.

◆ floormod() [4/4]

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

Definition at line 260 of file ElementFunctions.h.

◆ isfinite()

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

Definition at line 251 of file ElementFunctions.h.

◆ isinf()

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

Definition at line 246 of file ElementFunctions.h.

◆ isnan()

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

Definition at line 241 of file ElementFunctions.h.

◆ 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 94 of file ElementFunctions.h.

◆ 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 79 of file ElementFunctions.h.

References near().

◆ near() [3/8]

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

Definition at line 57 of file ElementFunctions.h.

◆ near() [4/8]

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

Definition at line 77 of file ElementFunctions.h.

References near().

◆ near() [5/8]

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

Definition at line 75 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.

◆ near() [7/8]

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

Definition at line 24 of file ElementFunctions.h.

◆ near() [8/8]

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

Definition at line 11 of file ElementFunctions.h.

Referenced by near(), near(), and 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 111 of file ElementFunctions.h.

◆ 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 106 of file ElementFunctions.h.

◆ nearAbs() [3/6]

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

Definition at line 134 of file ElementFunctions.h.

◆ nearAbs() [4/6]

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

Definition at line 130 of file ElementFunctions.h.

◆ nearAbs() [5/6]

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

Definition at line 126 of file ElementFunctions.h.

◆ nearAbs() [6/6]

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

Definition at line 116 of file ElementFunctions.h.