DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Attributes
DGtal::Thresholder< T, isLower, isEqual > Class Template Reference

#include <BasicFunctors.h>

Collaboration diagram for DGtal::Thresholder< T, isLower, isEqual >:
Collaboration graph
[legend]

Public Types

typedef T Input

Public Member Functions

 BOOST_CONCEPT_ASSERT ((boost::EqualityComparable< T >))
 BOOST_CONCEPT_ASSERT ((boost::LessThanComparable< T >))
 Thresholder (const Input &aT=0)
bool operator() (const Input &aI) const

Private Attributes

Input myT

Detailed Description

template<typename T, bool isLower = true, bool isEqual = true>
class DGtal::Thresholder< T, isLower, isEqual >

Aim: A small functor with an operator () that compares one value to a threshold value according to two bool template parameters.

// template class Thresholder

Template Parameters:
Ttype for a value that must be equally and less-than comparable
isLowera bool for the comparison sign : 'true' for < (default), 'false' for <
isEquala bool for the equality : 'true' for a large inequality (default), 'false' for a strict one

Definition at line 283 of file BasicFunctors.h.


Member Typedef Documentation

template<typename T, bool isLower = true, bool isEqual = true>
typedef T DGtal::Thresholder< T, isLower, isEqual >::Input

Definition at line 288 of file BasicFunctors.h.


Constructor & Destructor Documentation

template<typename T, bool isLower = true, bool isEqual = true>
DGtal::Thresholder< T, isLower, isEqual >::Thresholder ( const Input aT = 0)
inline

Constructor.

Parameters:
valuethe threshold value (default 0).

Definition at line 294 of file BasicFunctors.h.

:myT(aT) {};

Member Function Documentation

template<typename T, bool isLower = true, bool isEqual = true>
DGtal::Thresholder< T, isLower, isEqual >::BOOST_CONCEPT_ASSERT ( (boost::EqualityComparable< T >)  )
template<typename T, bool isLower = true, bool isEqual = true>
DGtal::Thresholder< T, isLower, isEqual >::BOOST_CONCEPT_ASSERT ( (boost::LessThanComparable< T >)  )
template<typename T, bool isLower = true, bool isEqual = true>
bool DGtal::Thresholder< T, isLower, isEqual >::operator() ( const Input aI) const
inline

Compares aI to @ myT.

Parameters:
aIany input value
Returns:
'true' or 'false' according to isLower and isEqual

Definition at line 300 of file BasicFunctors.h.

References DGtal::Thresholder< T, isLower, isEqual >::myT.

{
std::less_equal<Input> c;
return c(aI,myT);
}

Field Documentation

template<typename T, bool isLower = true, bool isEqual = true>
Input DGtal::Thresholder< T, isLower, isEqual >::myT
private

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