casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::Near< L, R > Struct Template Reference

Functor to test if two values are relatively near each other. More...

#include <Functors.h>

List of all members.

Public Member Functions

 Near (double tolerance=1e-5)
bool operator() (L left, R right) const

Private Attributes

double itsTolerance

Detailed Description

template<typename L, typename R = L>
struct casa::Near< L, R >

Functor to test if two values are relatively near each other.

 It can be used in something like:
        std::transform (left.begin(), left.cend(), right.begin(),
                        result.cbegin(), Near<T>(tolerance));

Definition at line 283 of file Functors.h.


Constructor & Destructor Documentation

template<typename L , typename R = L>
casa::Near< L, R >::Near ( double  tolerance = 1e-5) [inline, explicit]

Definition at line 285 of file Functors.h.


Member Function Documentation

template<typename L , typename R = L>
bool casa::Near< L, R >::operator() ( left,
right 
) const [inline]

Definition at line 288 of file Functors.h.

References casa::Near< L, R >::itsTolerance, and casa::near().


Member Data Documentation

template<typename L , typename R = L>
double casa::Near< L, R >::itsTolerance [private]

Definition at line 291 of file Functors.h.

Referenced by casa::Near< L, R >::operator()().


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