|
AndroMeta
2.0.0
|
Random number generation and probability distributions. More...
#include <MRandom.h>
Public Member Functions | |
| MRandom (uint64_t seed=0) | |
| MRandom (const mvar &v, RestoreOpt opt) | |
| MRandom (const MRandom &random) | |
| ~MRandom () | |
| void | store (mvar &v) const |
| MObject * | clone () const |
| void | setSeed (uint64_t seed) |
| uint64_t | timeSeed () |
| double | uniform () |
| double | uniform (double a, double b) |
| double | exponential (double x) |
| double | normal (double m, double s) |
| double | erlang (double n, double x) |
| double | pareto (double k, double a) |
| double | lognormal (double a, double b) |
| double | chisquare (double n) |
| long | bernoulli (double p) |
| long | equilikely (long a, long b) |
| long | binomial (long n, double p) |
| long | geometric (double p) |
| long | bpascal (long n, double p) |
| long | poisson (double m) |
| mvec | sequence (long a, long b) |
| virtual mnode | process (mnode n, uint32_t flags=0) |
Random number generation and probability distributions.
Includes a number of discrete and continuous probability distributions. MRandom is storeable and restoreable.
| Meta::MRandom::MRandom | ( | uint64_t | seed = 0 | ) |
Constructor.
| Meta::MRandom::MRandom | ( | const mvar & | v, |
| RestoreOpt | opt | ||
| ) |
Restore constructor.
| Meta::MRandom::MRandom | ( | const MRandom & | random | ) |
Copy constructor.
Destructor.
| long Meta::MRandom::bernoulli | ( | double | p | ) |
| long Meta::MRandom::binomial | ( | long | n, |
| double | p | ||
| ) |
| long Meta::MRandom::bpascal | ( | long | n, |
| double | p | ||
| ) |
| double Meta::MRandom::chisquare | ( | double | n | ) |
| MObject* Meta::MRandom::clone | ( | ) | const [virtual] |
Copy this MRandom.
Reimplemented from Meta::MObject.
| long Meta::MRandom::equilikely | ( | long | a, |
| long | b | ||
| ) |
| double Meta::MRandom::erlang | ( | double | n, |
| double | x | ||
| ) |
| double Meta::MRandom::exponential | ( | double | x | ) |
| long Meta::MRandom::geometric | ( | double | p | ) |
| double Meta::MRandom::lognormal | ( | double | a, |
| double | b | ||
| ) |
| double Meta::MRandom::normal | ( | double | m, |
| double | s | ||
| ) |
| double Meta::MRandom::pareto | ( | double | k, |
| double | a | ||
| ) |
| long Meta::MRandom::poisson | ( | double | m | ) |
| virtual mnode Meta::MRandom::process | ( | mnode | n, |
| uint32_t | flags = 0 |
||
| ) | [virtual] |
Process method.
Reimplemented from Meta::MObject.
| mvec Meta::MRandom::sequence | ( | long | a, |
| long | b | ||
| ) |
| void Meta::MRandom::setSeed | ( | uint64_t | seed | ) |
Reset the seed of the random number generator.
| void Meta::MRandom::store | ( | mvar & | v | ) | const [virtual] |
Store the state of this MRandom to v.
Reimplemented from Meta::MObject.
| uint64_t Meta::MRandom::timeSeed | ( | ) |
Seed the random number generator with the current time.
| double Meta::MRandom::uniform | ( | ) |
| double Meta::MRandom::uniform | ( | double | a, |
| double | b | ||
| ) |
1.7.6.1