aGrUM  0.16.0
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: