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

Arg Max function object class. More...

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

Public Types

using first_argument_type = GUM_SCALAR
using second_argument_type = GUM_SCALAR
using result_type = GUM_SCALAR

Public Member Functions

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

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 127 of file functors.h.

Member Typedef Documentation

◆ first_argument_type

template<class GUM_SCALAR>
using gum::ArgumentMaximises< GUM_SCALAR >::first_argument_type = GUM_SCALAR

Definition at line 139 of file functors.h.

◆ result_type

template<class GUM_SCALAR>
using gum::ArgumentMaximises< GUM_SCALAR >::result_type = GUM_SCALAR

Definition at line 141 of file functors.h.

◆ second_argument_type

template<class GUM_SCALAR>
using gum::ArgumentMaximises< GUM_SCALAR >::second_argument_type = GUM_SCALAR

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

133 {
134 return x.first >= y.first ? x : y;
135 }
Arg Max function object class.
Definition functors.h:127

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