ATLAS Offline Software
Loading...
Searching...
No Matches
Athena_test::uniform_real_distribution< T > Class Template Reference

#include <random.h>

Collaboration diagram for Athena_test::uniform_real_distribution< T >:

Public Member Functions

 uniform_real_distribution (T a, T b)
operator() (URNG &rng) const

Private Attributes

m_a
m_b

Detailed Description

template<class T>
class Athena_test::uniform_real_distribution< T >

Definition at line 132 of file random.h.

Constructor & Destructor Documentation

◆ uniform_real_distribution()

template<class T>
Athena_test::uniform_real_distribution< T >::uniform_real_distribution ( T a,
T b )
inline

Member Function Documentation

◆ operator()()

template<class T>
T Athena_test::uniform_real_distribution< T >::operator() ( URNG & rng) const
inline

Definition at line 136 of file random.h.

137 {
138 return static_cast<T>(rng())/URNG::max()*(m_b-m_a) + m_a;
139 }

Member Data Documentation

◆ m_a

template<class T>
T Athena_test::uniform_real_distribution< T >::m_a
private

Definition at line 142 of file random.h.

◆ m_b

template<class T>
T Athena_test::uniform_real_distribution< T >::m_b
private

Definition at line 143 of file random.h.


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