![]() |
|
|||
File indexing completed on 2025-04-19 09:06:53
0001 // -*- C++ -*- 0002 #ifndef RIVET_Random_HH 0003 #define RIVET_Random_HH 0004 0005 #include <random> 0006 // #if defined(_OPENMP) 0007 // #include "omp.h" 0008 // #endif 0009 0010 namespace Rivet { 0011 0012 /// Return a thread-safe random number generator (mainly for internal use) 0013 std::mt19937& rng(); 0014 0015 /// Return a uniformly sampled random number between 0 and 1 0016 double rand01(); 0017 0018 /// Return a random number sampled from a Gaussian/normal distribution 0019 double randnorm(double loc, double scale); 0020 0021 /// Return a random number sampled from a log-normal distribution 0022 double randlognorm(double loc, double scale); 0023 0024 /// Return a random number sampled from a Crystal Ball distribution 0025 double randcrystalball(double alpha, double n, double mu, double sigma); 0026 0027 0028 /// Probability density of a Gaussian/normal distribution at x 0029 double pNorm(double x, double mu, double sigma); 0030 /// Probability density of a Crystal Ball distribution at x 0031 double pCrystalBall(double x, double alpha, double n, double mu, double sigma); 0032 0033 0034 } 0035 0036 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |