SUNphi  1.0
ValWithExtreme.hpp File Reference

Defines a class which keeps track of extreme of a quantity. More...

#include <limits>
#include <metaprogramming/SwallowSemicolon.hpp>

Go to the source code of this file.

Classes

class  SUNphi::ValWithExtreme< T, E >
 Class which keeps track of extreme values of a given type. More...
 

Macros

#define PROVIDE_UNARY_OPERATOR(OP)
 Provide an unary operator OP. More...
 

Typedefs

template<typename T >
using SUNphi::ValWithMax = ValWithExtreme< T, MAXIMUM >
 class to keep a value and its maximum
 

Enumerations

enum  SUNphi::Extreme { MINIMUM, MAXIMUM }
 Possible extreme types.
 

Detailed Description

Defines a class which keeps track of extreme of a quantity.

The class holds value in the internal variable val The extreme value is host in the extr variable When the class is implicitly access

Definition in file ValWithExtreme.hpp.

Macro Definition Documentation

#define PROVIDE_UNARY_OPERATOR (   OP)
Value:
\
template <typename V> \
ValWithExtreme& operator OP (const V& oth) \
{ \
val OP \
oth; \
\
return \
updateExtreme(); \
}

Provide an unary operator OP.

Definition at line 107 of file ValWithExtreme.hpp.