Public Member Functions | List of all members
genie::supernova::Limits< T > Class Template Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/GenieSNova/src/Limits.h"

Inheritance diagram for genie::supernova::Limits< T >:

Public Member Functions

 Limits (const T &v)
 
 Limits (const T &v1, const T &v2)
 
const TMin () const
 
const TMax () const
 
T Range () const
 
void Set (double val1, double val2)
 
void UpdateMin (T val)
 
void UpdateMax (T val)
 
void Update (const Limits< T > &other)
 

Detailed Description

template<class T>
class genie::supernova::Limits< T >

Definition at line 8 of file Limits.h.

Constructor & Destructor Documentation

template<class T>
genie::supernova::Limits< T >::Limits ( const T v)
inline

Definition at line 10 of file Limits.h.

10 :std::pair<T, T> (v, v) {};
template<class T>
genie::supernova::Limits< T >::Limits ( const T v1,
const T v2 
)
inline

Definition at line 11 of file Limits.h.

11 :std::pair<T, T> (std::minmax(v1, v2)) {};

Member Function Documentation

template<class T>
const T& genie::supernova::Limits< T >::Max ( ) const
inline
template<class T>
const T& genie::supernova::Limits< T >::Min ( ) const
inline

Definition at line 14 of file Limits.h.

Referenced by genie::supernova::Limits< double >::Range(), and genie::supernova::Limits< double >::Update().

14 { return this->first; }
template<class T>
T genie::supernova::Limits< T >::Range ( ) const
inline

Definition at line 16 of file Limits.h.

16 { return Max() - Min(); }
const T & Min() const
Definition: Limits.h:14
const T & Max() const
Definition: Limits.h:15
template<class T>
void genie::supernova::Limits< T >::Set ( double  val1,
double  val2 
)
inline

Definition at line 19 of file Limits.h.

Referenced by genie::supernova::GFluxGenerator::GFluxGenerator().

19  {
20  this->first = val1;
21  this->second = val2;
22  }
template<class T>
void genie::supernova::Limits< T >::Update ( const Limits< T > &  other)
inline

Definition at line 25 of file Limits.h.

Referenced by genie::supernova::GSNovaModel::AddGenerator(), progbar.ProgressBar::Finish(), and progbar.ProgressBar::Start().

25  {
26  UpdateMin(other.Min());
27  UpdateMax(other.Max());
28  }
void UpdateMax(T val)
Definition: Limits.h:24
void UpdateMin(T val)
Definition: Limits.h:23
template<class T>
void genie::supernova::Limits< T >::UpdateMax ( T  val)
inline

Definition at line 24 of file Limits.h.

Referenced by genie::supernova::Limits< double >::Update().

24 { this->second = std::max(this->second, val); }
T max(const caf::Proxy< T > &a, T b)
template<class T>
void genie::supernova::Limits< T >::UpdateMin ( T  val)
inline

Definition at line 23 of file Limits.h.

Referenced by genie::supernova::Limits< double >::Update().

23 { this->first = std::min(this->first , val); }
T min(const caf::Proxy< T > &a, T b)

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