Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JTOOLS::JHashSet< JElement_t, JEvaluator_t >::JComparator Struct Reference

Auxiliary class for ordering of objects in the set by the hash value. More...

#include <JHashSet.hh>

Public Member Functions

 JComparator (const JEvaluator_t &evaluator=JEvaluator_t())
 Constructor.
 
bool operator() (const value_type &first, const value_type &second) const
 Comparison of elements.
 

Public Attributes

JEvaluator_t getValue
 Function object for evaluation of element.
 

Detailed Description

template<class JElement_t, class JEvaluator_t = JHashEvaluator>
struct JTOOLS::JHashSet< JElement_t, JEvaluator_t >::JComparator

Auxiliary class for ordering of objects in the set by the hash value.

Definition at line 50 of file JHashSet.hh.

Constructor & Destructor Documentation

◆ JComparator()

template<class JElement_t , class JEvaluator_t = JHashEvaluator>
JTOOLS::JHashSet< JElement_t, JEvaluator_t >::JComparator::JComparator ( const JEvaluator_t & evaluator = JEvaluator_t())
inline

Constructor.

Parameters
evaluatorevaluator

Definition at line 57 of file JHashSet.hh.

57 :
58 getValue(evaluator)
59 {}
JEvaluator_t getValue
Function object for evaluation of element.
Definition JHashSet.hh:78

Member Function Documentation

◆ operator()()

template<class JElement_t , class JEvaluator_t = JHashEvaluator>
bool JTOOLS::JHashSet< JElement_t, JEvaluator_t >::JComparator::operator() ( const value_type & first,
const value_type & second ) const
inline

Comparison of elements.

Parameters
firstfirst element
secondsecond element
Returns
true if first element less than second element; else false

Definition at line 69 of file JHashSet.hh.

70 {
71 return this->getValue(first) < this->getValue(second);
72 }

Member Data Documentation

◆ getValue

template<class JElement_t , class JEvaluator_t = JHashEvaluator>
JEvaluator_t JTOOLS::JHashSet< JElement_t, JEvaluator_t >::JComparator::getValue

Function object for evaluation of element.

Definition at line 78 of file JHashSet.hh.


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