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

<agrum/FMDP/planning/actionSet.h> More...

#include <actionSet.h>

Operator()

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

Detailed Description

template<typename GUM_SCALAR>
struct gum::ArgumentMaximisesAction< GUM_SCALAR >

<agrum/FMDP/planning/actionSet.h>

Argument Maximization function object class

Returns the set that has the maximal value between its two arguments sets

Definition at line 58 of file actionSet.h.

Member Function Documentation

◆ operator()()

template<typename GUM_SCALAR >
const GUM_SCALAR& gum::ArgumentMaximisesAction< GUM_SCALAR >::operator() ( const GUM_SCALAR &  x,
const GUM_SCALAR &  y 
) const
inline

Definition at line 64 of file actionSet.h.

References gum::ArgumentMaximisesAction< GUM_SCALAR >::_temp_.

64  {
65  if (x > y) { return x; }
66  if (x < y) { return y; }
67 
68  _temp_ = x;
69  _temp_ += y;
70  return _temp_;
71  }

Member Data Documentation

◆ _temp_

template<typename GUM_SCALAR >
GUM_SCALAR gum::ArgumentMaximisesAction< GUM_SCALAR >::_temp_
mutableprivate

Definition at line 74 of file actionSet.h.

Referenced by gum::ArgumentMaximisesAction< GUM_SCALAR >::operator()().


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