LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Attributes | List of all members
ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > > Struct Template Reference

Binary predicate for complex floating point equality comparison with tolerance. More...

#include <types.h>

Public Types

typedef std::complex< U1 > first_argument_type
 
typedef std::complex< U2 > second_argument_type
 
typedef bool result_type
 
typedef Promote< U1, U2 >::Type Promoted
 

Public Member Functions

result_type operator() (std::complex< U1 > const &a, std::complex< U2 > const &b) const
 
 ApproximatelyEqual (Promoted tolerance)
 

Private Attributes

ApproximatelyEqual< U1, U2 > _real
 

Detailed Description

template<typename U1, typename U2>
struct ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >

Binary predicate for complex floating point equality comparison with tolerance.

Implementation is roughly modeled after the floating point comparisons in the Boost.Test library.

Definition at line 177 of file types.h.

Member Typedef Documentation

template<typename U1 , typename U2 >
typedef std::complex<U1> ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >::first_argument_type

Definition at line 178 of file types.h.

template<typename U1 , typename U2 >
typedef Promote<U1,U2>::Type ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >::Promoted

Definition at line 182 of file types.h.

template<typename U1 , typename U2 >
typedef bool ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >::result_type

Definition at line 180 of file types.h.

template<typename U1 , typename U2 >
typedef std::complex<U2> ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >::second_argument_type

Definition at line 179 of file types.h.

Constructor & Destructor Documentation

template<typename U1 , typename U2 >
ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >::ApproximatelyEqual ( Promoted  tolerance)
inlineexplicit

Definition at line 188 of file types.h.

188 : _real(tolerance) {}

Member Function Documentation

template<typename U1 , typename U2 >
result_type ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >::operator() ( std::complex< U1 > const &  a,
std::complex< U2 > const &  b 
) const
inline

Definition at line 184 of file types.h.

184  {
185  return _real(a.real(),b.real()) && _real(a.imag(),b.imag());
186  }
afw::table::Key< double > b

Member Data Documentation

template<typename U1 , typename U2 >
ApproximatelyEqual<U1,U2> ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >::_real
private

Definition at line 191 of file types.h.


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