aGrUM  0.20.2
a C++ library for (probabilistic) graphical models
gum::ArgumentMaximises< GUM_SCALAR > Struct Template Reference

Arg Max function object class. More...

#include <agrum/tools/core/functors.h>

Public Member Functions

Operator()
GUM_SCALAR operator() (const GUM_SCALAR &x, const GUM_SCALAR &y) const
 

Public Types

typedef GUM_SCALAR first_argument_type
 
typedef GUM_SCALAR second_argument_type
 
typedef GUM_SCALAR result_type
 

Detailed Description

template<class GUM_SCALAR>
struct gum::ArgumentMaximises< GUM_SCALAR >

Arg Max function object class.

Parameters
Operator()takes two std::pairs. First element in each pair is the values we compare to do the argmax. Second element is the argument that leads to this value.
Returns
best pair => the argument that is the arg max is ret.second

Definition at line 110 of file functors.h.

Member Typedef Documentation

◆ first_argument_type

template<class GUM_SCALAR >
typedef GUM_SCALAR gum::ArgumentMaximises< GUM_SCALAR >::first_argument_type

Definition at line 122 of file functors.h.

◆ result_type

template<class GUM_SCALAR >
typedef GUM_SCALAR gum::ArgumentMaximises< GUM_SCALAR >::result_type

Definition at line 124 of file functors.h.

◆ second_argument_type

template<class GUM_SCALAR >
typedef GUM_SCALAR gum::ArgumentMaximises< GUM_SCALAR >::second_argument_type

Definition at line 123 of file functors.h.

Member Function Documentation

◆ operator()()

template<class GUM_SCALAR >
GUM_SCALAR gum::ArgumentMaximises< GUM_SCALAR >::operator() ( const GUM_SCALAR &  x,
const GUM_SCALAR &  y 
) const
inline

Definition at line 116 of file functors.h.

116  {
117  return x.first >= y.first ? x : y;
118  }

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