LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
geo::details::Comparer< T, Key, KeyExtractor, KeyComparer > Struct Template Reference

Class managing comparisons between T objects via a Key key. More...

#include "DriftPartitions.h"

Public Types

using Key_t = Key
 Type of comparison key. More...
 
using Object_t = T
 Type of object to be compared. More...
 

Public Member Functions

bool operator() (Key_t a, Key_t b) const
 
bool operator() (Object_t const &a, Key_t b) const
 
bool operator() (Key_t a, Object_t const &b) const
 
bool operator() (Object_t const &a, Object_t const &b) const
 

Static Private Member Functions

static auto key (T const &v)
 
static auto key_comp (Key_t a, Key_t b)
 

Detailed Description

template<typename T, typename Key, Key KeyExtractor, bool KeyComparer>
struct geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >

Class managing comparisons between T objects via a Key key.

Definition at line 64 of file DriftPartitions.h.

Member Typedef Documentation

template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
using geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::Key_t = Key

Type of comparison key.

Definition at line 227 of file DriftPartitions.h.

template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
using geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::Object_t = T

Type of object to be compared.

Definition at line 228 of file DriftPartitions.h.

Member Function Documentation

template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
static auto geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::key ( T const &  v)
inlinestaticprivate

Definition at line 239 of file DriftPartitions.h.

239 { return KeyExtractor(v); }
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
static auto geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::key_comp ( Key_t  a,
Key_t  b 
)
inlinestaticprivate

Definition at line 240 of file DriftPartitions.h.

240 { return KeyComparer(a, b); }
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
bool geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::operator() ( Key_t  a,
Key_t  b 
) const
inline

Definition at line 230 of file DriftPartitions.h.

230 { return key_comp(a, b); }
static auto key_comp(Key_t a, Key_t b)
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
bool geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::operator() ( Object_t const &  a,
Key_t  b 
) const
inline

Definition at line 231 of file DriftPartitions.h.

232  { return this->operator() (key(a), b); }
static auto key(T const &v)
bool operator()(Key_t a, Key_t b) const
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
bool geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::operator() ( Key_t  a,
Object_t const &  b 
) const
inline

Definition at line 233 of file DriftPartitions.h.

234  { return this->operator() (a, key(b)); }
static auto key(T const &v)
bool operator()(Key_t a, Key_t b) const
template<typename T , typename Key , Key KeyExtractor, bool KeyComparer>
bool geo::details::Comparer< T, Key, KeyExtractor, KeyComparer >::operator() ( Object_t const &  a,
Object_t const &  b 
) const
inline

Definition at line 235 of file DriftPartitions.h.

236  { return this->operator() (key(a), b); }
static auto key(T const &v)
bool operator()(Key_t a, Key_t b) const

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