#include <MaxCmp.h>
Public Member Functions | |
MaxCmp () | |
The default constructor. | |
MaxCmp (const T &t) | |
Constructor specifying an initial maximum value, t. | |
bool | operator() (const T &t) |
If t is the largest value seen so far return true. | |
operator const T & () const | |
Return the largest value so far. | |
Private Attributes | |
bool | init |
True if a first value has been given;. | |
T | max |
The largest value seen so far. |
The class simply checks if the given value to the operator() is the largest so far (in which case true is returned). It is mainly useful if is unclear what the smallest possible value would be.
Definition at line 26 of file MaxCmp.h.
bool ThePEG::MaxCmp< T >::operator() | ( | const T & | t | ) | [inline] |
If t is the largest value seen so far return true.
Otherwise return false.
Definition at line 46 of file MaxCmp.h.
References ThePEG::MaxCmp< T >::init, and ThePEG::MaxCmp< T >::max.