version 3.10-dev
Dumux::SimpleNormalDistribution< Scalar > Class Template Reference

A simple normal distribution based on a biased uniform number generator and the Box-Mueller transform. More...

#include <dumux/common/random.hh>

Inheritance diagram for Dumux::SimpleNormalDistribution< Scalar >:

Description

template<class Scalar = double>
class Dumux::SimpleNormalDistribution< Scalar >
Note
Use this if you need a fast library implementation independent generator without strict requirements about the bias
We try to stay close to https://en.cppreference.com/w/cpp/numeric/random/normal_distribution

Public Types

using param_type = Parameters
 
using result_type = Scalar
 

Public Member Functions

 SimpleNormalDistribution (Scalar mean, Scalar stddev=1.0)
 
 SimpleNormalDistribution (const Parameters &p)
 
 SimpleNormalDistribution ()
 
void param (const Parameters &p)
 
Parameters param () const
 
Scalar m () const
 
Scalar s () const
 
template<class Generator >
Scalar operator() (Generator &gen)
 

Member Typedef Documentation

◆ param_type

template<class Scalar = double>
using Dumux::SimpleNormalDistribution< Scalar >::param_type = Parameters

◆ result_type

template<class Scalar = double>
using Dumux::SimpleNormalDistribution< Scalar >::result_type = Scalar

Constructor & Destructor Documentation

◆ SimpleNormalDistribution() [1/3]

template<class Scalar = double>
Dumux::SimpleNormalDistribution< Scalar >::SimpleNormalDistribution ( Scalar  mean,
Scalar  stddev = 1.0 
)
inlineexplicit

◆ SimpleNormalDistribution() [2/3]

template<class Scalar = double>
Dumux::SimpleNormalDistribution< Scalar >::SimpleNormalDistribution ( const Parameters &  p)
inlineexplicit

◆ SimpleNormalDistribution() [3/3]

template<class Scalar = double>
Dumux::SimpleNormalDistribution< Scalar >::SimpleNormalDistribution ( )
inline

Member Function Documentation

◆ m()

template<class Scalar = double>
Scalar Dumux::SimpleNormalDistribution< Scalar >::m ( ) const
inline

◆ operator()()

template<class Scalar = double>
template<class Generator >
Scalar Dumux::SimpleNormalDistribution< Scalar >::operator() ( Generator &  gen)
inline

◆ param() [1/2]

template<class Scalar = double>
Parameters Dumux::SimpleNormalDistribution< Scalar >::param ( ) const
inline

◆ param() [2/2]

template<class Scalar = double>
void Dumux::SimpleNormalDistribution< Scalar >::param ( const Parameters &  p)
inline

◆ s()

template<class Scalar = double>
Scalar Dumux::SimpleNormalDistribution< Scalar >::s ( ) const
inline

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