nns.c  1.0.1
Nanowire Network simulator
distributions.h File Reference

Contains an utility function to generate random number from a normal distribution. Not supposed to be used directly by the user. More...

#include <gsl/gsl_rng.h>

Go to the source code of this file.

Functions

double normal_random (gsl_rng *rng, double µ, double σ)
 Return a double value from a normal (a.k.a. gaussian) distribution with the specified mu and sigma. More...
 

Detailed Description

Contains an utility function to generate random number from a normal distribution. Not supposed to be used directly by the user.

Function Documentation

◆ normal_random()

double normal_random ( gsl_rng *  rng,
double  µ,
double  σ 
)

Return a double value from a normal (a.k.a. gaussian) distribution with the specified mu and sigma.

Parameters
[in]rngThe core random number generator to use to produce the normal distribution.
[in]µThe expected median value of the distribution.
[in]σThe sigma of the distribution representing how wide it is.
Returns
A double generated according to the gaussian distribution.