|
ParM
parm
A molecular dynamics library
|
A class for generating two random numbers from a Gaussian distribution, with a given correlation. More...
#include <vecrand.hpp>
Public Member Functions | |
| BivariateGauss (const flt s1=1, const flt s2=1, const flt corr=0) | |
See set() for parameters. More... | |
| void | set (const flt s1, const flt s2, const flt corr) |
| Set the standard deviations and correlations. More... | |
| Eigen::Matrix< flt, 1, 2 > | generate () |
| Randomly generate two correlated numbers. More... | |
| Vec | gen_vec () |
| Generate a single Vec. More... | |
| VecPair | gen_vecs () |
| Randomly generate two correlated Vec objects. More... | |
Protected Attributes | |
| normdistribution | distro |
| normgenerator | gauss |
| flt | x11 |
| flt | x21 |
| flt | x22 |
A class for generating two random numbers from a Gaussian distribution, with a given correlation.
This is used by some of the integrators.
See set() for parameters.
|
inline |
Generate a single Vec.
| VecPair BivariateGauss::gen_vecs | ( | ) |
Randomly generate two correlated Vec objects.
| Eigen::Matrix< flt, 1, 2 > BivariateGauss::generate | ( | ) |
Randomly generate two correlated numbers.
Set the standard deviations and correlations.
| s1 | Standard deviation of the first vector. s1 > 0. |
| s2 | Standard deviation of the second vector. s2 > 0. |
| corr | Normalized correlation between the two vectors, 0 <= corr <= 1. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.10