CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
Adjacent< T1, Comp > Struct Template Reference
Inheritance diagram for Adjacent< T1, Comp >:

Public Member Functions

 Adjacent ()
 
 Adjacent (const Comp &iComp)
 
bool operator() (const T1 &lhs, const T1 &rhs) const
 

Public Attributes

Comp comp
 

Detailed Description

template<class T1, typename Comp = std::less<T1>>
struct Adjacent< T1, Comp >

Definition at line 18 of file LUT.cc.

Constructor & Destructor Documentation

template<class T1 , typename Comp = std::less<T1>>
Adjacent< T1, Comp >::Adjacent ( )
inline

Definition at line 20 of file LUT.cc.

20 {}
template<class T1 , typename Comp = std::less<T1>>
Adjacent< T1, Comp >::Adjacent ( const Comp &  iComp)
inline

Definition at line 21 of file LUT.cc.

21 :comp(iComp){}
Comp comp
Definition: LUT.cc:19

Member Function Documentation

template<class T1 , typename Comp = std::less<T1>>
bool Adjacent< T1, Comp >::operator() ( const T1 &  lhs,
const T1 &  rhs 
) const
inline

Definition at line 23 of file LUT.cc.

References funct::abs(), and Adjacent< T1, Comp >::comp.

23 {return std::abs(static_cast<int>(lhs-rhs))==1 && comp(lhs,rhs);}
Comp comp
Definition: LUT.cc:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

template<class T1 , typename Comp = std::less<T1>>
Comp Adjacent< T1, Comp >::comp

Definition at line 19 of file LUT.cc.

Referenced by Adjacent< T1, Comp >::operator()().