CppNoddy  0.92
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CppNoddy::abs_predicate< _Type > Class Template Reference

A function object predicate that compares the absolute value of two elements and returns a true of elt1 < elt2. More...

#include <Functors.h>

Public Member Functions

bool operator() (_Type elt1, _Type elt2)
 Return true if argument 1 < argument 2. More...
 

Detailed Description

template<typename _Type>
class CppNoddy::abs_predicate< _Type >

A function object predicate that compares the absolute value of two elements and returns a true of elt1 < elt2.

Definition at line 15 of file Functors.h.

Member Function Documentation

◆ operator()()

template<typename _Type >
bool CppNoddy::abs_predicate< _Type >::operator() ( _Type  elt1,
_Type  elt2 
)
inline

Return true if argument 1 < argument 2.

Parameters
elt1First element to compare
elt2Second element to compare

Definition at line 20 of file Functors.h.

20 {
21 return std::abs(elt2) > std::abs(elt1);
22 }

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

© 2012

R.E. Hewitt