C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
rnd_01< T > Struct Template Referencefinal
Inheritance diagram for rnd_01< T >:
[legend]
Collaboration diagram for rnd_01< T >:
[legend]

Public Member Functions

 rnd_01 ()
T operator() () override
 rnd_01 ()
T operator() ()
 rnd_01 ()
T operator() ()
 rnd_01 ()
T operator() ()
 rnd_01 ()
T operator() ()
 rnd_01 ()
T operator() ()
 rnd_01 ()
T operator() ()
Public Member Functions inherited from exprtk::ifunction< T >
 ifunction (const std::size_t &pc)
virtual ~ifunction ()
virtual T operator() (const T &)
virtual T operator() (const T &, const T &)
virtual T operator() (const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
virtual T operator() (const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &, const T &)
Public Member Functions inherited from exprtk::function_traits
 function_traits ()
bool & allow_zero_parameters ()
bool & has_side_effects ()
std::size_t & min_num_args ()
std::size_t & max_num_args ()

Public Attributes

std::mt19937 generator
std::uniform_real_distribution< T > distribution {T(0),T(1)}
Public Attributes inherited from exprtk::ifunction< T >
std::size_t param_count

Detailed Description

template<typename T>
struct rnd_01< T >

Definition at line 32 of file exprtk_game_of_life.cpp.

Constructor & Destructor Documentation

◆ rnd_01() [1/7]

template<typename T>
rnd_01< T >::rnd_01 ( )
inline

Definition at line 36 of file exprtk_game_of_life.cpp.

References generator, and exprtk::ifunction< T >::ifunction().

Here is the call graph for this function:

◆ rnd_01() [2/7]

template<typename T>
rnd_01< T >::rnd_01 ( )
inline

Definition at line 33 of file exprtk_montecarlo_e.cpp.

34 { ::srand(static_cast<unsigned int>(time(NULL))); }

References exprtk::ifunction< T >::ifunction().

Here is the call graph for this function:

◆ rnd_01() [3/7]

template<typename T>
rnd_01< T >::rnd_01 ( )
inline

Definition at line 33 of file exprtk_montecarlo_pi.cpp.

34 { ::srand(static_cast<unsigned int>(time(NULL))); }

References exprtk::ifunction< T >::ifunction().

Here is the call graph for this function:

◆ rnd_01() [4/7]

template<typename T>
rnd_01< T >::rnd_01 ( )
inline

Definition at line 66 of file exprtk_mpfr_repl.cpp.

67 { ::srand(static_cast<unsigned int>(time(NULL))); }

References exprtk::ifunction< T >::ifunction().

Here is the call graph for this function:

◆ rnd_01() [5/7]

template<typename T>
rnd_01< T >::rnd_01 ( )
inline

Definition at line 64 of file exprtk_repl.cpp.

65 { ::srand(static_cast<unsigned int>(time(NULL))); }

References exprtk::ifunction< T >::ifunction().

Here is the call graph for this function:

◆ rnd_01() [6/7]

template<typename T>
rnd_01< T >::rnd_01 ( )
inline

Definition at line 33 of file exprtk_simple_example_17.cpp.

34 { ::srand(static_cast<unsigned int>(time(NULL))); }

References exprtk::ifunction< T >::ifunction().

Here is the call graph for this function:

◆ rnd_01() [7/7]

template<typename T>
rnd_01< T >::rnd_01 ( )
inline

Definition at line 33 of file exprtk_wiener_process_pi.cpp.

34 { ::srand(static_cast<unsigned int>(time(NULL))); }

References exprtk::ifunction< T >::ifunction().

Here is the call graph for this function:

Member Function Documentation

◆ operator()() [1/7]

template<typename T>
T rnd_01< T >::operator() ( )
inlinevirtual

Reimplemented from exprtk::ifunction< T >.

Definition at line 36 of file exprtk_montecarlo_e.cpp.

37 {
38 // Note: Do not use this in production
39 // Result is in the interval [0,1)
40 return T(::rand() / T(RAND_MAX + 1.0));
41 }

◆ operator()() [2/7]

template<typename T>
T rnd_01< T >::operator() ( )
inlinevirtual

Reimplemented from exprtk::ifunction< T >.

Definition at line 36 of file exprtk_montecarlo_pi.cpp.

37 {
38 // Note: Do not use this in production
39 // Result is in the interval [0,1)
40 return T(::rand() / T(RAND_MAX + 1.0));
41 }

◆ operator()() [3/7]

template<typename T>
T rnd_01< T >::operator() ( )
inlinevirtual

Reimplemented from exprtk::ifunction< T >.

Definition at line 69 of file exprtk_mpfr_repl.cpp.

70 {
71 // Note: Do not use this in production
72 // Result is in the interval [0,1)
73 return T(::rand() / T(RAND_MAX + 1.0));
74 }

◆ operator()() [4/7]

template<typename T>
T rnd_01< T >::operator() ( )
inlinevirtual

Reimplemented from exprtk::ifunction< T >.

Definition at line 67 of file exprtk_repl.cpp.

68 {
69 // Note: Do not use this in production
70 // Result is in the interval [0,1)
71 return T(::rand() / T(RAND_MAX + 1.0));
72 }

◆ operator()() [5/7]

template<typename T>
T rnd_01< T >::operator() ( )
inlinevirtual

Reimplemented from exprtk::ifunction< T >.

Definition at line 36 of file exprtk_simple_example_17.cpp.

37 {
38 // Note: Do not use this in production
39 // Result is in the interval [0,1)
40 return T(::rand() / T(RAND_MAX + 1.0));
41 }

◆ operator()() [6/7]

template<typename T>
T rnd_01< T >::operator() ( )
inlinevirtual

Reimplemented from exprtk::ifunction< T >.

Definition at line 36 of file exprtk_wiener_process_pi.cpp.

37 {
38 // Note: Do not use this in production
39 // Result is in the interval [0,1)
40 return T(::rand() / T(RAND_MAX + 1.0));
41 }

◆ operator()() [7/7]

template<typename T>
T rnd_01< T >::operator() ( )
inlineoverridevirtual

Reimplemented from exprtk::ifunction< T >.

Definition at line 46 of file exprtk_game_of_life.cpp.

47 {
48 return distribution(generator);
49 }
std::uniform_real_distribution< T > distribution

References distribution, and generator.

Member Data Documentation

◆ distribution

template<typename T>
std::uniform_real_distribution<T> rnd_01< T >::distribution {T(0),T(1)}

Definition at line 52 of file exprtk_game_of_life.cpp.

52{T(0),T(1)};

Referenced by operator()().

◆ generator

template<typename T>
std::mt19937 rnd_01< T >::generator

Definition at line 51 of file exprtk_game_of_life.cpp.

Referenced by operator()(), and rnd_01().


The documentation for this struct was generated from the following files: