aGrUM  0.13.2
gum::ArgumentMaximises< GUM_SCALAR > Struct Template Reference

Arg Max function object class. More...

#include <agrum/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 108 of file functors.h.

Member Typedef Documentation

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

Definition at line 120 of file functors.h.

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

Definition at line 122 of file functors.h.

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

Definition at line 121 of file functors.h.

Member Function Documentation

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

Definition at line 114 of file functors.h.

114  {
115  return x.first >= y.first ? x : y;
116  }

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