List of Supported Random Distribution

Random Distributions for Real types

Function Scalar Type Description Equivalent to
Eigen::Rand::balanced float, double generates real values in the [-1, 1] range Eigen::DenseBase<Ty>::Random for floating point types
Eigen::Rand::chiSquared float, double generates real values on a chi-squared distribution. std::chi_squared_distribution
Eigen::Rand::exponential float, double generates real values on an exponential distribution. std::exponential_distribution
Eigen::Rand::extremeValue float, double generates real values on an extreme value distribution. std::extreme_value_distribution
Eigen::Rand::gamma float, double generates real values on a gamma distribution. std::gamma_distribution
Eigen::Rand::lognormal float, double generates real values on a lognormal distribution. std::lognormal_distribution
Eigen::Rand::normal float, double generates real values on a normal distribution. std::normal_distribution
Eigen::Rand::uniformReal float, double generates real values in the [-1, 0) range. std::generate_canonical
Eigen::Rand::weibull float, double generates real values on a Weibull distribution. std::weibull_distribution

Random Distributions for Integer Types

Function Scalar Type Description Equivalent to
Eigen::Rand::randBits int generates integers with random bits. Eigen::DenseBase<Ty>::Random for integer types
Eigen::Rand::discrete int generates random integers on a discrete distribution. std::discrete_distribution
Eigen::Rand::uniformInt int generates integers in the [min, max] range. std::uniform_int_distribution

Random Number Engines

Description Equivalent to
Eigen::Rand::Vmt19937_64 a vectorized version of Mersenne Twister algorithm. It generates two 64bit random integers simultaneously with SSE2 and four integers with AVX2. std::mt19937_64