EigenRand  0.3.0
Eigen::Rand Namespace Reference

namespace for EigenRand More...

Classes

class  BalancedGen
 Generator of reals in a range [-1, 1] More...
 
class  BetaGen
 Generator of reals on a beta distribution. More...
 
class  BinomialGen
 Generator of integers on a binomial distribution. More...
 
class  CauchyGen
 Generator of reals on a Cauchy distribution. More...
 
class  ChiSquaredGen
 Generator of reals on a chi-squared distribution. More...
 
class  DirichletGen
 Generator of reals on a Dirichlet distribution. More...
 
class  DiscreteGen
 Generator of integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i) More...
 
class  DiscreteGen< _Scalar, double >
 DiscreteGen with double precision More...
 
class  DiscreteGen< _Scalar, float >
 DiscreteGen with float precision More...
 
class  DiscreteGen< _Scalar, int32_t >
 DiscreteGen with int32_t precision More...
 
class  ExponentialGen
 Generator of reals on an exponential distribution. More...
 
class  ExtremeValueGen
 Generator of reals on an extreme value distribution. More...
 
class  FisherFGen
 Generator of reals on a Fisher's f distribution. More...
 
class  GammaGen
 Generator of reals on a gamma distribution. More...
 
class  GenBase
 Base class of all univariate random generators. More...
 
class  GeometricGen
 Generator of integers on a geometric distribution. More...
 
class  InvWishartGen
 Generator of real matrices on a inverse Wishart distribution. More...
 
class  LognormalGen
 Generator of reals on a lognormal distribution. More...
 
class  MersenneTwister
 A vectorized version of Mersenne Twister Engine. More...
 
class  MultinomialGen
 Generator of real vectors on a multinomial distribution. More...
 
class  MvMatGenBase
 Base class of all multivariate random matrix generators. More...
 
class  MvNormalGen
 Generator of real vectors on a multivariate normal distribution. More...
 
class  MvVecGenBase
 Base class of all multivariate random vector generators. More...
 
class  NegativeBinomialGen
 Generator of integers on a negative binomial distribution. More...
 
class  NormalGen
 Generator of reals on a normal distribution. More...
 
class  PoissonGen
 Generator of integers on a Poisson distribution. More...
 
class  RandbitsGen
 Generator of random bits for integral scalars. More...
 
class  StdNormalGen
 Generator of reals on the standard normal distribution. More...
 
class  StudentTGen
 Generator of reals on a Student's t distribution. More...
 
class  UniformIntGen
 Generator of integers with a given range [min, max] More...
 
class  UniformRealGen
 Generator of reals in a range [0, 1) More...
 
class  WeibullGen
 Generator of reals on a Weibull distribution. More...
 
class  WishartGen
 Generator of real matrices on a Wishart distribution. More...
 

Typedefs

using OptCacheStore = CacheStore< EIGEN_MAX_ALIGN_BYTES >
 
template<typename Derived , typename Urng >
using RandBitsType = CwiseNullaryOp< internal::scalar_rng_adaptor< RandbitsGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using BalancedType = CwiseNullaryOp< internal::scalar_rng_adaptor< BalancedGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using UniformRealType = CwiseNullaryOp< internal::scalar_rng_adaptor< UniformRealGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using UniformIntType = CwiseNullaryOp< internal::scalar_rng_adaptor< UniformIntGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using DiscreteFType = CwiseNullaryOp< internal::scalar_rng_adaptor< DiscreteGen< typename Derived::Scalar, float >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using DiscreteDType = CwiseNullaryOp< internal::scalar_rng_adaptor< DiscreteGen< typename Derived::Scalar, double >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using DiscreteType = CwiseNullaryOp< internal::scalar_rng_adaptor< DiscreteGen< typename Derived::Scalar, int32_t >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using PoissonType = CwiseNullaryOp< internal::scalar_rng_adaptor< PoissonGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using BinomialType = CwiseNullaryOp< internal::scalar_rng_adaptor< BinomialGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using GeometricType = CwiseNullaryOp< internal::scalar_rng_adaptor< GeometricGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using NegativeBinomialType = CwiseNullaryOp< internal::scalar_rng_adaptor< NegativeBinomialGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using BetaType = CwiseNullaryOp< internal::scalar_rng_adaptor< BetaGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using CauchyType = CwiseNullaryOp< internal::scalar_rng_adaptor< CauchyGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using NormalType = CwiseNullaryOp< internal::scalar_rng_adaptor< StdNormalGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using Normal2Type = CwiseNullaryOp< internal::scalar_rng_adaptor< NormalGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using LognormalType = CwiseNullaryOp< internal::scalar_rng_adaptor< LognormalGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using StudentTType = CwiseNullaryOp< internal::scalar_rng_adaptor< StudentTGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using ExponentialType = CwiseNullaryOp< internal::scalar_rng_adaptor< ExponentialGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using GammaType = CwiseNullaryOp< internal::scalar_rng_adaptor< GammaGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using WeibullType = CwiseNullaryOp< internal::scalar_rng_adaptor< WeibullGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using ExtremeValueType = CwiseNullaryOp< internal::scalar_rng_adaptor< ExtremeValueGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using ChiSquaredType = CwiseNullaryOp< internal::scalar_rng_adaptor< ChiSquaredGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using FisherFType = CwiseNullaryOp< internal::scalar_rng_adaptor< FisherFGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Packet >
using Pmt19937_64 = MersenneTwister< Packet, 312, 156, 31, 0xb5026f5aa96619e9, 29, 0x5555555555555555, 17, 0x71d67fffeda60000, 37, 0xfff7eee000000000, 43, 6364136223846793005 >
 Alias of Eigen::Rand::MersenneTwister, equivalent to std::mt19937_64. More...
 
template<typename UIntType , typename BaseRng >
using PacketRandomEngineAdaptor = ParallelRandomEngineAdaptor< UIntType, BaseRng, sizeof(typename BaseRng::result_type)/sizeof(uint64_t)>
 Scalar adaptor for random engines which generates packet. More...
 
template<typename UIntType , typename Rng >
using UniversalRandomEngine = typename std::conditional< IsPacketRandomEngine< typename std::remove_reference< Rng >::type >::value, PacketRandomEngineAdaptor< UIntType, typename std::remove_reference< Rng >::type >, typename std::conditional< IsScalarRandomEngine< typename std::remove_reference< Rng >::type >::value, RandomEngineWrapper< typename std::remove_reference< Rng >::type >, void >::type >::type
 
using Vmt19937_64 = std::mt19937_64
 same as std::mt19937_64 when EIGEN_DONT_VECTORIZE, Pmt19937_64<internal::Packet4i> when SSE2 enabled and Pmt19937_64<internal::Packet8i> when AVX2 enabled More...
 
template<typename UIntType = uint64_t>
using P8_mt19937_64 = ParallelRandomEngineAdaptor< UIntType, Vmt19937_64, 8 >
 a vectorized mt19937_64 which generates 8 integers of 64bit simultaneously. It always yields the same value regardless of SIMD ISA.
 

Enumerations

enum  RandomEngineType { none, scalar, packet }
 

Functions

template<typename Derived , typename Urng >
const RandBitsType< Derived, Urng > randBits (Index rows, Index cols, Urng &&urng)
 generates integers with random bits More...
 
template<typename Derived , typename Urng >
const RandBitsType< Derived, Urng > randBitsLike (Derived &o, Urng &&urng)
 generates integers with random bits More...
 
template<typename Derived , typename Urng >
const BalancedType< Derived, Urng > balanced (Index rows, Index cols, Urng &&urng)
 generates reals in a range [-1, 1] More...
 
template<typename Derived , typename Urng >
const BalancedType< Derived, Urng > balancedLike (const Derived &o, Urng &&urng)
 generates reals in a range [-1, 1] More...
 
template<typename Derived , typename Urng >
const UniformRealType< Derived, Urng > uniformReal (Index rows, Index cols, Urng &&urng)
 generates reals in a range [0, 1) More...
 
template<typename Derived , typename Urng >
const UniformRealType< Derived, Urng > uniformRealLike (Derived &o, Urng &&urng)
 generates reals in a range [0, 1) More...
 
template<typename Derived , typename Urng >
const UniformIntType< Derived, Urng > uniformInt (Index rows, Index cols, Urng &&urng, typename Derived::Scalar min, typename Derived::Scalar max)
 generates integers with a given range [min, max] More...
 
template<typename Derived , typename Urng >
const UniformIntType< Derived, Urng > uniformIntLike (Derived &o, Urng &&urng, typename Derived::Scalar min, typename Derived::Scalar max)
 generates integers with a given range [min, max] More...
 
template<typename Derived , typename Urng , typename RealIter >
const DiscreteFType< Derived, Urng > discreteF (Index rows, Index cols, Urng &&urng, RealIter first, RealIter last)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is float(23bit precision). More...
 
template<typename Derived , typename Urng , typename RealIter >
const DiscreteFType< Derived, Urng > discreteFLike (Derived &o, Urng &&urng, RealIter first, RealIter last)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is float(23bit precision). More...
 
template<typename Derived , typename Urng , typename Real >
const DiscreteFType< Derived, Urng > discreteF (Index rows, Index cols, Urng &&urng, const std::initializer_list< Real > &il)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is float(23bit precision). More...
 
template<typename Derived , typename Urng , typename Real >
const DiscreteFType< Derived, Urng > discreteFLike (Derived &o, Urng &&urng, const std::initializer_list< Real > &il)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is float(23bit precision). More...
 
template<typename Derived , typename Urng , typename RealIter >
const DiscreteDType< Derived, Urng > discreteD (Index rows, Index cols, Urng &&urng, RealIter first, RealIter last)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is double(52bit precision). More...
 
template<typename Derived , typename Urng , typename RealIter >
const DiscreteDType< Derived, Urng > discreteDLike (Derived &o, Urng &&urng, RealIter first, RealIter last)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is double(52bit precision). More...
 
template<typename Derived , typename Urng , typename Real >
const DiscreteDType< Derived, Urng > discreteD (Index rows, Index cols, Urng &&urng, const std::initializer_list< Real > &il)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is double(52bit precision). More...
 
template<typename Derived , typename Urng , typename Real >
const DiscreteDType< Derived, Urng > discreteDLike (Derived &o, Urng &&urng, const std::initializer_list< Real > &il)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is double(52bit precision). More...
 
template<typename Derived , typename Urng , typename RealIter >
const DiscreteType< Derived, Urng > discrete (Index rows, Index cols, Urng &&urng, RealIter first, RealIter last)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is int32(32bit precision). More...
 
template<typename Derived , typename Urng , typename RealIter >
const DiscreteType< Derived, Urng > discreteLike (Derived &o, Urng &&urng, RealIter first, RealIter last)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is int32(32bit precision). More...
 
template<typename Derived , typename Urng , typename Real >
const DiscreteType< Derived, Urng > discrete (Index rows, Index cols, Urng &&urng, const std::initializer_list< Real > &il)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is int32(32bit precision). More...
 
template<typename Derived , typename Urng , typename Real >
const DiscreteType< Derived, Urng > discreteLike (Derived &o, Urng &&urng, const std::initializer_list< Real > &il)
 generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is int32(32bit precision). More...
 
template<typename Derived , typename Urng >
const PoissonType< Derived, Urng > poisson (Index rows, Index cols, Urng &&urng, double mean=1)
 generates reals on the Poisson distribution. More...
 
template<typename Derived , typename Urng >
const PoissonType< Derived, Urng > poissonLike (Derived &o, Urng &&urng, double mean=1)
 generates reals on the Poisson distribution. More...
 
template<typename Derived , typename Urng >
const BinomialType< Derived, Urng > binomial (Index rows, Index cols, Urng &&urng, typename Derived::Scalar trials=1, double p=0.5)
 generates reals on the binomial distribution. More...
 
template<typename Derived , typename Urng >
const BinomialType< Derived, Urng > binomialLike (Derived &o, Urng &&urng, typename Derived::Scalar trials=1, double p=0.5)
 generates reals on the binomial distribution. More...
 
template<typename Derived , typename Urng >
const GeometricType< Derived, Urng > geometric (Index rows, Index cols, Urng &&urng, double p=0.5)
 generates reals on the geometric distribution. More...
 
template<typename Derived , typename Urng >
const GeometricType< Derived, Urng > geometricLike (Derived &o, Urng &&urng, double p=0.5)
 generates reals on the geometric distribution. More...
 
template<typename Derived , typename Urng >
const NegativeBinomialType< Derived, Urng > negativeBinomial (Index rows, Index cols, Urng &&urng, typename Derived::Scalar trials=1, double p=0.5)
 generates reals on the negative binomial distribution. More...
 
template<typename Derived , typename Urng >
const NegativeBinomialType< Derived, Urng > negativeBinomialLike (Derived &o, Urng &&urng, typename Derived::Scalar trials=1, double p=0.5)
 generates reals on the negative binomial distribution. More...
 
template<typename Derived , typename Urng >
const BetaType< Derived, Urng > beta (Index rows, Index cols, Urng &&urng, typename Derived::Scalar a=1, typename Derived::Scalar b=1)
 generates reals on the beta distribution. More...
 
template<typename Derived , typename Urng >
const BetaType< Derived, Urng > betaLike (Derived &o, Urng &&urng, typename Derived::Scalar a=1, typename Derived::Scalar b=1)
 generates reals on the beta distribution. More...
 
template<typename Derived , typename Urng >
const CauchyType< Derived, Urng > cauchy (Index rows, Index cols, Urng &&urng, typename Derived::Scalar a=0, typename Derived::Scalar b=1)
 generates reals on the Cauchy distribution. More...
 
template<typename Derived , typename Urng >
const CauchyType< Derived, Urng > cauchyLike (Derived &o, Urng &&urng, typename Derived::Scalar a=0, typename Derived::Scalar b=1)
 generates reals on the Cauchy distribution. More...
 
template<typename Derived , typename Urng >
const NormalType< Derived, Urng > normal (Index rows, Index cols, Urng &&urng)
 generates reals on a standard normal distribution (mean = 0, stdev=1) More...
 
template<typename Derived , typename Urng >
const NormalType< Derived, Urng > normalLike (Derived &o, Urng &&urng)
 generates reals on a standard normal distribution (mean = 0, stdev=1) More...
 
template<typename Derived , typename Urng >
const Normal2Type< Derived, Urng > normal (Index rows, Index cols, Urng &&urng, typename Derived::Scalar mean, typename Derived::Scalar stdev=1)
 generates reals on a normal distribution with arbitrary mean and stdev. More...
 
template<typename Derived , typename Urng >
const Normal2Type< Derived, Urng > normalLike (Derived &o, Urng &&urng, typename Derived::Scalar mean, typename Derived::Scalar stdev=1)
 generates reals on a normal distribution with arbitrary mean and stdev. More...
 
template<typename Derived , typename Urng >
const LognormalType< Derived, Urng > lognormal (Index rows, Index cols, Urng &&urng, typename Derived::Scalar mean=0, typename Derived::Scalar stdev=1)
 generates reals on a lognormal distribution with arbitrary mean and stdev. More...
 
template<typename Derived , typename Urng >
const LognormalType< Derived, Urng > lognormalLike (Derived &o, Urng &&urng, typename Derived::Scalar mean=0, typename Derived::Scalar stdev=1)
 generates reals on a lognormal distribution with arbitrary mean and stdev. More...
 
template<typename Derived , typename Urng >
const StudentTType< Derived, Urng > studentT (Index rows, Index cols, Urng &&urng, typename Derived::Scalar n=1)
 generates reals on the Student's t distribution with arbirtrary degress of freedom. More...
 
template<typename Derived , typename Urng >
const StudentTType< Derived, Urng > studentTLike (Derived &o, Urng &&urng, typename Derived::Scalar n=1)
 generates reals on the Student's t distribution with arbirtrary degress of freedom. More...
 
template<typename Derived , typename Urng >
const ExponentialType< Derived, Urng > exponential (Index rows, Index cols, Urng &&urng, typename Derived::Scalar lambda=1)
 generates reals on an exponential distribution with arbitrary scale parameter. More...
 
template<typename Derived , typename Urng >
const ExponentialType< Derived, Urng > exponentialLike (Derived &o, Urng &&urng, typename Derived::Scalar lambda=1)
 generates reals on an exponential distribution with arbitrary scale parameter. More...
 
template<typename Derived , typename Urng >
const GammaType< Derived, Urng > gamma (Index rows, Index cols, Urng &&urng, typename Derived::Scalar alpha=1, typename Derived::Scalar beta=1)
 generates reals on a gamma distribution with arbitrary shape and scale parameter. More...
 
template<typename Derived , typename Urng >
const GammaType< Derived, Urng > gammaLike (Derived &o, Urng &&urng, typename Derived::Scalar alpha=1, typename Derived::Scalar beta=1)
 generates reals on a gamma distribution with arbitrary shape and scale parameter. More...
 
template<typename Derived , typename Urng >
const WeibullType< Derived, Urng > weibull (Index rows, Index cols, Urng &&urng, typename Derived::Scalar a=1, typename Derived::Scalar b=1)
 generates reals on a Weibull distribution with arbitrary shape and scale parameter. More...
 
template<typename Derived , typename Urng >
const WeibullType< Derived, Urng > weibullLike (Derived &o, Urng &&urng, typename Derived::Scalar a=1, typename Derived::Scalar b=1)
 generates reals on a Weibull distribution with arbitrary shape and scale parameter. More...
 
template<typename Derived , typename Urng >
const ExtremeValueType< Derived, Urng > extremeValue (Index rows, Index cols, Urng &&urng, typename Derived::Scalar a=0, typename Derived::Scalar b=1)
 generates reals on an extreme value distribution (a.k.a Gumbel Type I, log-Weibull, Fisher-Tippett Type I) with arbitrary shape and scale parameter. More...
 
template<typename Derived , typename Urng >
const ExtremeValueType< Derived, Urng > extremeValueLike (Derived &o, Urng &&urng, typename Derived::Scalar a=0, typename Derived::Scalar b=1)
 generates reals on an extreme value distribution (a.k.a Gumbel Type I, log-Weibull, Fisher-Tippett Type I) with arbitrary shape and scale parameter. More...
 
template<typename Derived , typename Urng >
const ChiSquaredType< Derived, Urng > chiSquared (Index rows, Index cols, Urng &&urng, typename Derived::Scalar n=1)
 generates reals on the Chi-squared distribution with arbitrary degrees of freedom. More...
 
template<typename Derived , typename Urng >
const ChiSquaredType< Derived, Urng > chiSquaredLike (Derived &o, Urng &&urng, typename Derived::Scalar n=1)
 generates reals on the Chi-squared distribution with arbitrary degrees of freedom. More...
 
template<typename Derived , typename Urng >
const FisherFType< Derived, Urng > fisherF (Index rows, Index cols, Urng &&urng, typename Derived::Scalar m=1, typename Derived::Scalar n=1)
 generates reals on the Fisher's F distribution. More...
 
template<typename Derived , typename Urng >
const FisherFType< Derived, Urng > fisherFLike (Derived &o, Urng &&urng, typename Derived::Scalar m=1, typename Derived::Scalar n=1)
 generates reals on the Fisher's F distribution. More...
 
template<typename IntTy , typename WeightTy >
auto makeMultinomialGen (IntTy trials, const MatrixBase< WeightTy > &probs) -> MultinomialGen< IntTy, MatrixBase< WeightTy >::RowsAtCompileTime >
 helper function constructing Eigen::Rand::MultinomialGen More...
 
template<typename AlphaTy >
auto makeDirichletGen (const MatrixBase< AlphaTy > &alpha) -> DirichletGen< typename MatrixBase< AlphaTy >::Scalar, MatrixBase< AlphaTy >::RowsAtCompileTime >
 helper function constructing Eigen::Rand::DirichletGen More...
 
template<typename MeanTy , typename CovTy >
auto makeMvNormGen (const MatrixBase< MeanTy > &mean, const MatrixBase< CovTy > &cov) -> MvNormalGen< typename MatrixBase< MeanTy >::Scalar, MatrixBase< MeanTy >::RowsAtCompileTime >
 helper function constructing Eigen::Rand::MvNormal More...
 
template<typename MeanTy , typename LTTy >
auto makeMvNormGenFromLt (const MatrixBase< MeanTy > &mean, const MatrixBase< LTTy > &lt) -> MvNormalGen< typename MatrixBase< MeanTy >::Scalar, MatrixBase< MeanTy >::RowsAtCompileTime >
 helper function constructing Eigen::Rand::MvNormal More...
 
template<typename ScaleTy >
auto makeWishartGen (Index df, const MatrixBase< ScaleTy > &scale) -> WishartGen< typename MatrixBase< ScaleTy >::Scalar, MatrixBase< ScaleTy >::RowsAtCompileTime >
 helper function constructing Eigen::Rand::WishartGen More...
 
template<typename LTTy >
auto makeWishartGenFromLt (Index df, const MatrixBase< LTTy > &lt) -> WishartGen< typename MatrixBase< LTTy >::Scalar, MatrixBase< LTTy >::RowsAtCompileTime >
 helper function constructing Eigen::Rand::WishartGen More...
 
template<typename ScaleTy >
auto makeInvWishartGen (Index df, const MatrixBase< ScaleTy > &scale) -> InvWishartGen< typename MatrixBase< ScaleTy >::Scalar, MatrixBase< ScaleTy >::RowsAtCompileTime >
 helper function constructing Eigen::Rand::InvWishartGen More...
 
template<typename ILTTy >
auto makeInvWishartGenFromIlt (Index df, const MatrixBase< ILTTy > &ilt) -> InvWishartGen< typename MatrixBase< ILTTy >::Scalar, MatrixBase< ILTTy >::RowsAtCompileTime >
 helper function constructing Eigen::Rand::InvWishartGen More...
 
template<typename UIntType , typename Rng >
UniversalRandomEngine< UIntType, Rng > makeUniversalRng (Rng &&rng)
 Helper function for making a UniversalRandomEngine. More...
 

Variables

constexpr detail::FullMatrix full_matrix
 
constexpr detail::LowerTriangular lower_triangular
 
constexpr detail::InvLowerTriangular inv_lower_triangular
 

Detailed Description

namespace for EigenRand

Typedef Documentation

◆ PacketRandomEngineAdaptor

template<typename UIntType , typename BaseRng >
using Eigen::Rand::PacketRandomEngineAdaptor = typedef ParallelRandomEngineAdaptor<UIntType, BaseRng, sizeof(typename BaseRng::result_type) / sizeof(uint64_t)>

Scalar adaptor for random engines which generates packet.

Template Parameters
UIntTypescalar integer type for result_type of an adapted random number engine
BaseRng

◆ Pmt19937_64

template<typename Packet >
using Eigen::Rand::Pmt19937_64 = typedef MersenneTwister<Packet, 312, 156, 31, 0xb5026f5aa96619e9, 29, 0x5555555555555555, 17, 0x71d67fffeda60000, 37, 0xfff7eee000000000, 43, 6364136223846793005>

Alias of Eigen::Rand::MersenneTwister, equivalent to std::mt19937_64.

Template Parameters
Packet

◆ Vmt19937_64

using Eigen::Rand::Vmt19937_64 = typedef std::mt19937_64

same as std::mt19937_64 when EIGEN_DONT_VECTORIZE, Pmt19937_64<internal::Packet4i> when SSE2 enabled and Pmt19937_64<internal::Packet8i> when AVX2 enabled

Note
It yields the same random sequence only within the same seed and the same SIMD ISA. If you want to keep the same random sequence across different SIMD ISAs, use P8_mt19937_64.

Function Documentation

◆ balanced()

template<typename Derived , typename Urng >
const BalancedType<Derived, Urng> Eigen::Rand::balanced ( Index  rows,
Index  cols,
Urng &&  urng 
)
inline

generates reals in a range [-1, 1]

Template Parameters
Deriveda type of Eigen::DenseBase
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::BalancedGen

◆ balancedLike()

template<typename Derived , typename Urng >
const BalancedType<Derived, Urng> Eigen::Rand::balancedLike ( const Derived &  o,
Urng &&  urng 
)
inline

generates reals in a range [-1, 1]

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::BalancedGen

◆ beta()

template<typename Derived , typename Urng >
const BetaType<Derived, Urng> Eigen::Rand::beta ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  a = 1,
typename Derived::Scalar  b = 1 
)
inline

generates reals on the beta distribution.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
a,bshape parameter
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::BetaGen

◆ betaLike()

template<typename Derived , typename Urng >
const BetaType<Derived, Urng> Eigen::Rand::betaLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  a = 1,
typename Derived::Scalar  b = 1 
)
inline

generates reals on the beta distribution.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
a,bshape parameter
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::BetaGen

◆ binomial()

template<typename Derived , typename Urng >
const BinomialType<Derived, Urng> Eigen::Rand::binomial ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  trials = 1,
double  p = 0.5 
)
inline

generates reals on the binomial distribution.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
trialsthe number of trials
pprobability of a trial generating true
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::BinomialGen

◆ binomialLike()

template<typename Derived , typename Urng >
const BinomialType<Derived, Urng> Eigen::Rand::binomialLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  trials = 1,
double  p = 0.5 
)
inline

generates reals on the binomial distribution.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
trialsthe number of trials
pprobability of a trial generating true
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::BinomialGen

◆ cauchy()

template<typename Derived , typename Urng >
const CauchyType<Derived, Urng> Eigen::Rand::cauchy ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  a = 0,
typename Derived::Scalar  b = 1 
)
inline

generates reals on the Cauchy distribution.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
aa location parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::CauchyGen

◆ cauchyLike()

template<typename Derived , typename Urng >
const CauchyType<Derived, Urng> Eigen::Rand::cauchyLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  a = 0,
typename Derived::Scalar  b = 1 
)
inline

generates reals on the Cauchy distribution.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
aa location parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::CauchyGen

◆ chiSquared()

template<typename Derived , typename Urng >
const ChiSquaredType<Derived, Urng> Eigen::Rand::chiSquared ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  n = 1 
)
inline

generates reals on the Chi-squared distribution with arbitrary degrees of freedom.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
nthe degrees of freedom of the distribution
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::ChiSquaredGen

◆ chiSquaredLike()

template<typename Derived , typename Urng >
const ChiSquaredType<Derived, Urng> Eigen::Rand::chiSquaredLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  n = 1 
)
inline

generates reals on the Chi-squared distribution with arbitrary degrees of freedom.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
nthe degrees of freedom of the distribution
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::ChiSquaredGen

◆ discrete() [1/2]

template<typename Derived , typename Urng , typename Real >
const DiscreteType<Derived, Urng> Eigen::Rand::discrete ( Index  rows,
Index  cols,
Urng &&  urng,
const std::initializer_list< Real > &  il 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is int32(32bit precision).

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
ilan instance of initializer_list containing the numbers to use as weights. The type of the elements referred by it must be convertible to double.
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::DiscreteGen

◆ discrete() [2/2]

template<typename Derived , typename Urng , typename RealIter >
const DiscreteType<Derived, Urng> Eigen::Rand::discrete ( Index  rows,
Index  cols,
Urng &&  urng,
RealIter  first,
RealIter  last 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is int32(32bit precision).

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
first,lastthe range of elements defining the numbers to use as weights. The type of the elements referred by RealIter must be convertible to double.
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::DiscreteGen

◆ discreteD() [1/2]

template<typename Derived , typename Urng , typename Real >
const DiscreteDType<Derived, Urng> Eigen::Rand::discreteD ( Index  rows,
Index  cols,
Urng &&  urng,
const std::initializer_list< Real > &  il 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is double(52bit precision).

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
ilan instance of initializer_list containing the numbers to use as weights. The type of the elements referred by it must be convertible to double.
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::DiscreteGen

◆ discreteD() [2/2]

template<typename Derived , typename Urng , typename RealIter >
const DiscreteDType<Derived, Urng> Eigen::Rand::discreteD ( Index  rows,
Index  cols,
Urng &&  urng,
RealIter  first,
RealIter  last 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is double(52bit precision).

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
first,lastthe range of elements defining the numbers to use as weights. The type of the elements referred by RealIter must be convertible to double.
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::DiscreteGen

◆ discreteDLike() [1/2]

template<typename Derived , typename Urng , typename Real >
const DiscreteDType<Derived, Urng> Eigen::Rand::discreteDLike ( Derived &  o,
Urng &&  urng,
const std::initializer_list< Real > &  il 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is double(52bit precision).

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
ilan instance of initializer_list containing the numbers to use as weights. The type of the elements referred by it must be convertible to double.
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::DiscreteGen

◆ discreteDLike() [2/2]

template<typename Derived , typename Urng , typename RealIter >
const DiscreteDType<Derived, Urng> Eigen::Rand::discreteDLike ( Derived &  o,
Urng &&  urng,
RealIter  first,
RealIter  last 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is double(52bit precision).

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
first,lastthe range of elements defining the numbers to use as weights. The type of the elements referred by RealIter must be convertible to double.
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::DiscreteGen

◆ discreteF() [1/2]

template<typename Derived , typename Urng , typename Real >
const DiscreteFType<Derived, Urng> Eigen::Rand::discreteF ( Index  rows,
Index  cols,
Urng &&  urng,
const std::initializer_list< Real > &  il 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is float(23bit precision).

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
ilan instance of initializer_list containing the numbers to use as weights. The type of the elements referred by it must be convertible to double.
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::DiscreteGen

◆ discreteF() [2/2]

template<typename Derived , typename Urng , typename RealIter >
const DiscreteFType<Derived, Urng> Eigen::Rand::discreteF ( Index  rows,
Index  cols,
Urng &&  urng,
RealIter  first,
RealIter  last 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is float(23bit precision).

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
first,lastthe range of elements defining the numbers to use as weights. The type of the elements referred by RealIter must be convertible to double.
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::DiscreteGen

◆ discreteFLike() [1/2]

template<typename Derived , typename Urng , typename Real >
const DiscreteFType<Derived, Urng> Eigen::Rand::discreteFLike ( Derived &  o,
Urng &&  urng,
const std::initializer_list< Real > &  il 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is float(23bit precision).

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
ilan instance of initializer_list containing the numbers to use as weights. The type of the elements referred by it must be convertible to double.
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::DiscreteGen

◆ discreteFLike() [2/2]

template<typename Derived , typename Urng , typename RealIter >
const DiscreteFType<Derived, Urng> Eigen::Rand::discreteFLike ( Derived &  o,
Urng &&  urng,
RealIter  first,
RealIter  last 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is float(23bit precision).

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
first,lastthe range of elements defining the numbers to use as weights. The type of the elements referred by RealIter must be convertible to double.
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::DiscreteGen

◆ discreteLike() [1/2]

template<typename Derived , typename Urng , typename Real >
const DiscreteType<Derived, Urng> Eigen::Rand::discreteLike ( Derived &  o,
Urng &&  urng,
const std::initializer_list< Real > &  il 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is int32(32bit precision).

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
ilan instance of initializer_list containing the numbers to use as weights. The type of the elements referred by it must be convertible to double.
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::DiscreteGen

◆ discreteLike() [2/2]

template<typename Derived , typename Urng , typename RealIter >
const DiscreteType<Derived, Urng> Eigen::Rand::discreteLike ( Derived &  o,
Urng &&  urng,
RealIter  first,
RealIter  last 
)
inline

generates random integers on the interval [0, n), where the probability of each individual integer i is proportional to w(i). The data type used for calculation of probabilities is int32(32bit precision).

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
first,lastthe range of elements defining the numbers to use as weights. The type of the elements referred by RealIter must be convertible to double.
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::DiscreteGen

◆ exponential()

template<typename Derived , typename Urng >
const ExponentialType<Derived, Urng> Eigen::Rand::exponential ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  lambda = 1 
)
inline

generates reals on an exponential distribution with arbitrary scale parameter.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
lambdaa scale parameter of the distribution
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::ExponentialGen

◆ exponentialLike()

template<typename Derived , typename Urng >
const ExponentialType<Derived, Urng> Eigen::Rand::exponentialLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  lambda = 1 
)
inline

generates reals on an exponential distribution with arbitrary scale parameter.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
lambdaa scale parameter of the distribution
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::ExponentialGen

◆ extremeValue()

template<typename Derived , typename Urng >
const ExtremeValueType<Derived, Urng> Eigen::Rand::extremeValue ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  a = 0,
typename Derived::Scalar  b = 1 
)
inline

generates reals on an extreme value distribution (a.k.a Gumbel Type I, log-Weibull, Fisher-Tippett Type I) with arbitrary shape and scale parameter.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
aa location parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::ExtremeValueGen

◆ extremeValueLike()

template<typename Derived , typename Urng >
const ExtremeValueType<Derived, Urng> Eigen::Rand::extremeValueLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  a = 0,
typename Derived::Scalar  b = 1 
)
inline

generates reals on an extreme value distribution (a.k.a Gumbel Type I, log-Weibull, Fisher-Tippett Type I) with arbitrary shape and scale parameter.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
aa location parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::ExtremeValueGen

◆ fisherF()

template<typename Derived , typename Urng >
const FisherFType<Derived, Urng> Eigen::Rand::fisherF ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  m = 1,
typename Derived::Scalar  n = 1 
)
inline

generates reals on the Fisher's F distribution.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
mdegrees of freedom
ndegrees of freedom
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::FisherFGen

◆ fisherFLike()

template<typename Derived , typename Urng >
const FisherFType<Derived, Urng> Eigen::Rand::fisherFLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  m = 1,
typename Derived::Scalar  n = 1 
)
inline

generates reals on the Fisher's F distribution.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
mdegrees of freedom
ndegrees of freedom
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::FisherFGen

◆ gamma()

template<typename Derived , typename Urng >
const GammaType<Derived, Urng> Eigen::Rand::gamma ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  alpha = 1,
typename Derived::Scalar  beta = 1 
)
inline

generates reals on a gamma distribution with arbitrary shape and scale parameter.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
alphaa shape parameter of the distribution
betaa scale parameter of the distribution
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::GammaGen

◆ gammaLike()

template<typename Derived , typename Urng >
const GammaType<Derived, Urng> Eigen::Rand::gammaLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  alpha = 1,
typename Derived::Scalar  beta = 1 
)
inline

generates reals on a gamma distribution with arbitrary shape and scale parameter.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
alphaa shape parameter of the distribution
betaa scale parameter of the distribution
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::GammaGen

◆ geometric()

template<typename Derived , typename Urng >
const GeometricType<Derived, Urng> Eigen::Rand::geometric ( Index  rows,
Index  cols,
Urng &&  urng,
double  p = 0.5 
)
inline

generates reals on the geometric distribution.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
pprobability of a trial generating true
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::GeometricGen

◆ geometricLike()

template<typename Derived , typename Urng >
const GeometricType<Derived, Urng> Eigen::Rand::geometricLike ( Derived &  o,
Urng &&  urng,
double  p = 0.5 
)
inline

generates reals on the geometric distribution.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
pprobability of a trial generating true
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::GeometricGen

◆ lognormal()

template<typename Derived , typename Urng >
const LognormalType<Derived, Urng> Eigen::Rand::lognormal ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  mean = 0,
typename Derived::Scalar  stdev = 1 
)
inline

generates reals on a lognormal distribution with arbitrary mean and stdev.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
meana mean value of the distribution
stdeva standard deviation value of the distribution
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::LognormalGen

◆ lognormalLike()

template<typename Derived , typename Urng >
const LognormalType<Derived, Urng> Eigen::Rand::lognormalLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  mean = 0,
typename Derived::Scalar  stdev = 1 
)
inline

generates reals on a lognormal distribution with arbitrary mean and stdev.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
meana mean value of the distribution
stdeva standard deviation value of the distribution
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::LognormalGen

◆ makeDirichletGen()

template<typename AlphaTy >
auto Eigen::Rand::makeDirichletGen ( const MatrixBase< AlphaTy > &  alpha) -> DirichletGen<typename MatrixBase<AlphaTy>::Scalar, MatrixBase<AlphaTy>::RowsAtCompileTime>
inline

helper function constructing Eigen::Rand::DirichletGen

Template Parameters
AlphaTy
Parameters
alphaThe concentration parameters with shape (Dim, 1) of matrix or vector. The number of entries determines the dimensionality of the distribution.
Returns
an instance of MultinomialGen in the appropriate type

◆ makeInvWishartGen()

template<typename ScaleTy >
auto Eigen::Rand::makeInvWishartGen ( Index  df,
const MatrixBase< ScaleTy > &  scale 
) -> InvWishartGen<typename MatrixBase<ScaleTy>::Scalar, MatrixBase<ScaleTy>::RowsAtCompileTime>
inline

helper function constructing Eigen::Rand::InvWishartGen

Template Parameters
ScaleTy
Parameters
dfdegrees of freedom
scalescale matrix

◆ makeInvWishartGenFromIlt()

template<typename ILTTy >
auto Eigen::Rand::makeInvWishartGenFromIlt ( Index  df,
const MatrixBase< ILTTy > &  ilt 
) -> InvWishartGen<typename MatrixBase<ILTTy>::Scalar, MatrixBase<ILTTy>::RowsAtCompileTime>
inline

helper function constructing Eigen::Rand::InvWishartGen

Template Parameters
ILTTy
Parameters
dfdegrees of freedom
iltlower triangular matrix of decomposed inverse scale

◆ makeMultinomialGen()

template<typename IntTy , typename WeightTy >
auto Eigen::Rand::makeMultinomialGen ( IntTy  trials,
const MatrixBase< WeightTy > &  probs 
) -> MultinomialGen<IntTy, MatrixBase<WeightTy>::RowsAtCompileTime>
inline

helper function constructing Eigen::Rand::MultinomialGen

Template Parameters
IntTy
WeightTy
Parameters
trialsthe number of trials
probsThe weights of each category with shape (Dim, 1) of matrix or vector. The number of entries determines the dimensionality of the distribution
Returns
an instance of MultinomialGen in the appropriate type

◆ makeMvNormGen()

template<typename MeanTy , typename CovTy >
auto Eigen::Rand::makeMvNormGen ( const MatrixBase< MeanTy > &  mean,
const MatrixBase< CovTy > &  cov 
) -> MvNormalGen<typename MatrixBase<MeanTy>::Scalar, MatrixBase<MeanTy>::RowsAtCompileTime>
inline

helper function constructing Eigen::Rand::MvNormal

Template Parameters
MeanTy
CovTy
Parameters
meanmean vector of the distribution
covcovariance matrix (should be positive semi-definite)

◆ makeMvNormGenFromLt()

template<typename MeanTy , typename LTTy >
auto Eigen::Rand::makeMvNormGenFromLt ( const MatrixBase< MeanTy > &  mean,
const MatrixBase< LTTy > &  lt 
) -> MvNormalGen<typename MatrixBase<MeanTy>::Scalar, MatrixBase<MeanTy>::RowsAtCompileTime>
inline

helper function constructing Eigen::Rand::MvNormal

Template Parameters
MeanTy
LTTy
Parameters
meanmean vector of the distribution
ltlower triangular matrix of decomposed covariance

◆ makeUniversalRng()

template<typename UIntType , typename Rng >
UniversalRandomEngine<UIntType, Rng> Eigen::Rand::makeUniversalRng ( Rng &&  rng)

Helper function for making a UniversalRandomEngine.

Template Parameters
UIntType
Rng
Parameters
rngany random number engine for either packet or scalar type
Returns
an instance of PacketRandomEngineAdaptor for UIntType

◆ makeWishartGen()

template<typename ScaleTy >
auto Eigen::Rand::makeWishartGen ( Index  df,
const MatrixBase< ScaleTy > &  scale 
) -> WishartGen<typename MatrixBase<ScaleTy>::Scalar, MatrixBase<ScaleTy>::RowsAtCompileTime>
inline

helper function constructing Eigen::Rand::WishartGen

Template Parameters
ScaleTy
Parameters
dfdegrees of freedom
scalescale matrix (should be positive definitive)

◆ makeWishartGenFromLt()

template<typename LTTy >
auto Eigen::Rand::makeWishartGenFromLt ( Index  df,
const MatrixBase< LTTy > &  lt 
) -> WishartGen<typename MatrixBase<LTTy>::Scalar, MatrixBase<LTTy>::RowsAtCompileTime>
inline

helper function constructing Eigen::Rand::WishartGen

Template Parameters
LTTy
Parameters
dfdegrees of freedom
ltlower triangular matrix of decomposed scale

◆ negativeBinomial()

template<typename Derived , typename Urng >
const NegativeBinomialType<Derived, Urng> Eigen::Rand::negativeBinomial ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  trials = 1,
double  p = 0.5 
)
inline

generates reals on the negative binomial distribution.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
trialsthe number of trial successes
pprobability of a trial generating true
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::NegativeBinomialGen

◆ negativeBinomialLike()

template<typename Derived , typename Urng >
const NegativeBinomialType<Derived, Urng> Eigen::Rand::negativeBinomialLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  trials = 1,
double  p = 0.5 
)
inline

generates reals on the negative binomial distribution.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
trialsthe number of trial successes
pprobability of a trial generating true
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::NegativeBinomialGen

◆ normal() [1/2]

template<typename Derived , typename Urng >
const NormalType<Derived, Urng> Eigen::Rand::normal ( Index  rows,
Index  cols,
Urng &&  urng 
)
inline

generates reals on a standard normal distribution (mean = 0, stdev=1)

Template Parameters
Deriveda type of Eigen::DenseBase
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::StdNormalGen

◆ normal() [2/2]

template<typename Derived , typename Urng >
const Normal2Type<Derived, Urng> Eigen::Rand::normal ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  mean,
typename Derived::Scalar  stdev = 1 
)
inline

generates reals on a normal distribution with arbitrary mean and stdev.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
meana mean value of the distribution
stdeva standard deviation value of the distribution
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::NormalGen

◆ normalLike() [1/2]

template<typename Derived , typename Urng >
const NormalType<Derived, Urng> Eigen::Rand::normalLike ( Derived &  o,
Urng &&  urng 
)
inline

generates reals on a standard normal distribution (mean = 0, stdev=1)

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::StdNormalGen

◆ normalLike() [2/2]

template<typename Derived , typename Urng >
const Normal2Type<Derived, Urng> Eigen::Rand::normalLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  mean,
typename Derived::Scalar  stdev = 1 
)
inline

generates reals on a normal distribution with arbitrary mean and stdev.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
meana mean value of the distribution
stdeva standard deviation value of the distribution
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::NormalGen

◆ poisson()

template<typename Derived , typename Urng >
const PoissonType<Derived, Urng> Eigen::Rand::poisson ( Index  rows,
Index  cols,
Urng &&  urng,
double  mean = 1 
)
inline

generates reals on the Poisson distribution.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
meanrate parameter
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::PoissonGen

◆ poissonLike()

template<typename Derived , typename Urng >
const PoissonType<Derived, Urng> Eigen::Rand::poissonLike ( Derived &  o,
Urng &&  urng,
double  mean = 1 
)
inline

generates reals on the Poisson distribution.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
meanrate parameter
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::PoissonGen

◆ randBits()

template<typename Derived , typename Urng >
const RandBitsType<Derived, Urng> Eigen::Rand::randBits ( Index  rows,
Index  cols,
Urng &&  urng 
)
inline

generates integers with random bits

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::RandbitsGen

◆ randBitsLike()

template<typename Derived , typename Urng >
const RandBitsType<Derived, Urng> Eigen::Rand::randBitsLike ( Derived &  o,
Urng &&  urng 
)
inline

generates integers with random bits

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::RandbitsGen

◆ studentT()

template<typename Derived , typename Urng >
const StudentTType<Derived, Urng> Eigen::Rand::studentT ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  n = 1 
)
inline

generates reals on the Student's t distribution with arbirtrary degress of freedom.

Template Parameters
Deriveda type of Eigen::DenseBase
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
ndegrees of freedom
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::StudentTGen

◆ studentTLike()

template<typename Derived , typename Urng >
const StudentTType<Derived, Urng> Eigen::Rand::studentTLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  n = 1 
)
inline

generates reals on the Student's t distribution with arbirtrary degress of freedom.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
ndegrees of freedom
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::StudentTGen

◆ uniformInt()

template<typename Derived , typename Urng >
const UniformIntType<Derived, Urng> Eigen::Rand::uniformInt ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  min,
typename Derived::Scalar  max 
)
inline

generates integers with a given range [min, max]

Template Parameters
Deriveda type of Eigen::DenseBase
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
min,maxthe range of integers being generated
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::UniformIntGen

◆ uniformIntLike()

template<typename Derived , typename Urng >
const UniformIntType<Derived, Urng> Eigen::Rand::uniformIntLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  min,
typename Derived::Scalar  max 
)
inline

generates integers with a given range [min, max]

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
min,maxthe range of integers being generated
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::UniformIntGen

◆ uniformReal()

template<typename Derived , typename Urng >
const UniformRealType<Derived, Urng> Eigen::Rand::uniformReal ( Index  rows,
Index  cols,
Urng &&  urng 
)
inline

generates reals in a range [0, 1)

Template Parameters
Deriveda type of Eigen::DenseBase
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::UniformRealGen

◆ uniformRealLike()

template<typename Derived , typename Urng >
const UniformRealType<Derived, Urng> Eigen::Rand::uniformRealLike ( Derived &  o,
Urng &&  urng 
)
inline

generates reals in a range [0, 1)

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::UniformRealGen

◆ weibull()

template<typename Derived , typename Urng >
const WeibullType<Derived, Urng> Eigen::Rand::weibull ( Index  rows,
Index  cols,
Urng &&  urng,
typename Derived::Scalar  a = 1,
typename Derived::Scalar  b = 1 
)
inline

generates reals on a Weibull distribution with arbitrary shape and scale parameter.

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
aa shape parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::WeibullGen

◆ weibullLike()

template<typename Derived , typename Urng >
const WeibullType<Derived, Urng> Eigen::Rand::weibullLike ( Derived &  o,
Urng &&  urng,
typename Derived::Scalar  a = 1,
typename Derived::Scalar  b = 1 
)
inline

generates reals on a Weibull distribution with arbitrary shape and scale parameter.

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
aa shape parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::WeibullGen