aGrUM  0.20.3
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 106 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 118 of file functors.h.

◆ result_type

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

Definition at line 120 of file functors.h.

◆ second_argument_type

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

Definition at line 119 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 112 of file functors.h.

112  {
113  return x.first >= y.first ? x : y;
114  }

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