EigenRand  0.5.0
 
Loading...
Searching...
No Matches
Eigen::Rand Namespace Reference

namespace for EigenRand More...

Classes

class  Balanced2Gen
 Generator of reals in a range [a, b] More...
 
class  BalancedGen
 Generator of reals in a range [-1, 1] More...
 
class  BernoulliGen
 Generator of Bernoulli distribution. 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  StdUniformRealGen
 Generator of reals in a range [0, 1) 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 [a, b) 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 Balanced2Type = CwiseNullaryOp< internal::scalar_rng_adaptor< Balanced2Gen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using BalancedVVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< BalancedVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, const Derived >
 
template<typename Derived , typename Urng >
using BalancedVSType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< BalancedVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived > >
 
template<typename Derived , typename Urng >
using BalancedSVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< BalancedVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived >, const Derived >
 
template<typename Derived , typename Urng >
using StdUniformRealType = CwiseNullaryOp< internal::scalar_rng_adaptor< StdUniformRealGen< 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 UniformRealVVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< UniformRealVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, const Derived >
 
template<typename Derived , typename Urng >
using UniformRealVSType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< UniformRealVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived > >
 
template<typename Derived , typename Urng >
using UniformRealSVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< UniformRealVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived >, const Derived >
 
template<typename Derived , typename Urng >
using BernoulliType = CwiseNullaryOp< internal::scalar_rng_adaptor< BernoulliGen< typename Derived::Scalar >, typename Derived::Scalar, Urng, true >, const Derived >
 
template<typename Derived , typename Urng >
using BernoulliVType = CwiseUnaryOp< internal::scalar_unary_rng_adaptor< BernoulliVGen< typename Derived::Scalar >, 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 Lhs , typename Rhs , typename Urng >
using BinomialVVType = CwiseHeteroBinaryOp< internal::scalar_binary_rng_adaptor< BinomialVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, typename Rhs::Scalar, Urng, true >, const Lhs, const Rhs >
 
template<typename Lhs , typename Urng >
using BinomialVSType = CwiseHeteroBinaryOp< internal::scalar_binary_rng_adaptor< BinomialVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, float, Urng, true >, const Lhs, CwiseNullaryOp< internal::scalar_constant_op< float >, const typename impl::CastType< Lhs, float >::type > >
 
template<typename Rhs , typename Urng >
using BinomialSVType = CwiseHeteroBinaryOp< internal::scalar_binary_rng_adaptor< BinomialVGen< int32_t >, int32_t, int32_t, typename Rhs::Scalar, Urng, true >, CwiseNullaryOp< internal::scalar_constant_op< int32_t >, const typename impl::CastType< Rhs, int32_t >::type >, const Rhs >
 
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 Lhs , typename Rhs , typename Urng >
using CauchyVVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< CauchyVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, typename Rhs::Scalar, Urng, true >, const Lhs, const Rhs >
 
template<typename Derived , typename Urng >
using CauchyVSType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< CauchyVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived > >
 
template<typename Derived , typename Urng >
using CauchySVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< CauchyVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived >, 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 Lhs , typename Rhs , typename Urng >
using NormalVVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< NormalVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, typename Rhs::Scalar, Urng, true >, const Lhs, const Rhs >
 
template<typename Derived , typename Urng >
using NormalVSType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< NormalVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived > >
 
template<typename Derived , typename Urng >
using NormalSVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< NormalVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived >, 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 Lhs , typename Rhs , typename Urng >
using LognormalVVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< LognormalVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, typename Rhs::Scalar, Urng, true >, const Lhs, const Rhs >
 
template<typename Derived , typename Urng >
using LognormalVSType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< LognormalVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived > >
 
template<typename Derived , typename Urng >
using LognormalSVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< LognormalVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived >, 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 Lhs , typename Urng >
using StudentTVType = CwiseUnaryOp< internal::scalar_unary_rng_adaptor< StudentTVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, Urng, true >, const Lhs >
 
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 Lhs , typename Urng >
using ExponentialVType = CwiseUnaryOp< internal::scalar_unary_rng_adaptor< ExponentialVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, Urng, true >, const Lhs >
 
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 Lhs , typename Rhs , typename Urng >
using WeibullVVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< WeibullVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, typename Rhs::Scalar, Urng, true >, const Lhs, const Rhs >
 
template<typename Derived , typename Urng >
using WeibullVSType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< WeibullVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived > >
 
template<typename Derived , typename Urng >
using WeibullSVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< WeibullVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived >, 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 Lhs , typename Rhs , typename Urng >
using ExtremeValueVVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< ExtremeValueVGen< typename Lhs::Scalar >, typename Lhs::Scalar, typename Lhs::Scalar, typename Rhs::Scalar, Urng, true >, const Lhs, const Rhs >
 
template<typename Derived , typename Urng >
using ExtremeValueVSType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< ExtremeValueVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, const Derived, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived > >
 
template<typename Derived , typename Urng >
using ExtremeValueSVType = CwiseBinaryOp< internal::scalar_binary_rng_adaptor< ExtremeValueVGen< typename Derived::Scalar >, typename Derived::Scalar, typename Derived::Scalar, typename Derived::Scalar, Urng, true >, CwiseNullaryOp< internal::scalar_constant_op< typename Derived::Scalar >, const Derived >, 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< IsScalarFullBitRandomEngine< 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 = ParallelRandomEngineAdaptor< UIntType, Vmt19937_64, 8 >
 
using P8_mt19937_64 = P8_mt19937< uint64_t >
 a vectorized mt19937_64 which generates 8 integers of 64bit simultaneously. It always yields the same value regardless of SIMD ISA.
 
using P8_mt19937_64_32 = P8_mt19937< uint32_t >
 

Enumerations

enum class  RandomEngineType { none , scalar , scalar_fullbit , 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 Balanced2Type< Derived, Urng > balanced (Index rows, Index cols, Urng &&urng, typename Derived::Scalar a, typename Derived::Scalar b)
 generates reals in a range [a, b] More...
 
template<typename Derived , typename Urng >
const Balanced2Type< Derived, Urng > balancedLike (const Derived &o, Urng &&urng, typename Derived::Scalar a, typename Derived::Scalar b)
 generates reals in a range [a, b] More...
 
template<typename Lhs , typename Rhs , typename Urng >
const BalancedVVType< Lhs, Urng > balanced (Urng &&urng, const ArrayBase< Lhs > &a, const ArrayBase< Rhs > &b)
 generates reals in a range [a, b] More...
 
template<typename Lhs , typename Urng >
const BalancedVSType< Lhs, Urng > balanced (Urng &&urng, const ArrayBase< Lhs > &a, typename Lhs::Scalar b)
 
template<typename Rhs , typename Urng >
const BalancedSVType< Rhs, Urng > balanced (Urng &&urng, typename Rhs::Scalar a, const ArrayBase< Rhs > &b)
 
template<typename Derived , typename Urng >
const StdUniformRealType< Derived, Urng > uniformReal (Index rows, Index cols, Urng &&urng)
 generates reals in a range [0, 1) More...
 
template<typename Derived , typename Urng >
const StdUniformRealType< Derived, Urng > uniformRealLike (Derived &o, Urng &&urng)
 generates reals in a range [0, 1) More...
 
template<typename Derived , typename Urng >
const UniformRealType< Derived, Urng > uniformReal (Index rows, Index cols, Urng &&urng, typename Derived::Scalar min, typename Derived::Scalar max)
 generates reals in a range [min, max) More...
 
template<typename Derived , typename Urng >
const UniformRealType< Derived, Urng > uniformRealLike (Derived &o, Urng &&urng, typename Derived::Scalar min, typename Derived::Scalar max)
 generates reals in a range [min, max) More...
 
template<typename Lhs , typename Rhs , typename Urng >
const UniformRealVVType< Lhs, Urng > uniformReal (Urng &&urng, const ArrayBase< Lhs > &a, const ArrayBase< Rhs > &b)
 generates reals in a range [a, b) More...
 
template<typename Lhs , typename Urng >
const UniformRealVSType< Lhs, Urng > uniformReal (Urng &&urng, const ArrayBase< Lhs > &a, typename Lhs::Scalar b)
 
template<typename Rhs , typename Urng >
const UniformRealSVType< Rhs, Urng > uniformReal (Urng &&urng, typename Rhs::Scalar a, const ArrayBase< Rhs > &b)
 
template<typename Derived , typename Urng >
const BernoulliType< Derived, Urng > bernoulli (Index rows, Index cols, Urng &&urng, double p=0.5)
 generates 1 with probability p and 0 with probability 1 - p More...
 
template<typename Derived , typename Urng >
const BernoulliType< Derived, Urng > bernoulli (Derived &o, Urng &&urng, double p=0.5)
 generates 1 with probability p and 0 with probability 1 - p More...
 
template<typename Lhs , typename Urng >
const BernoulliVType< Lhs, Urng > bernoulli (Urng &&urng, const ArrayBase< Lhs > &p)
 generates 1 with probability p and 0 with probability 1 - p 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 Lhs , typename Rhs , typename Urng >
const BinomialVVType< Lhs, Rhs, Urng > binomial (Urng &&urng, const ArrayBase< Lhs > &trials, const ArrayBase< Rhs > &p)
 generates reals on the binomial distribution. More...
 
template<typename Lhs , typename Urng >
const BinomialVSType< Lhs, Urng > binomial (Urng &&urng, const ArrayBase< Lhs > &trials, float p)
 
template<typename Rhs , typename Urng >
const BinomialSVType< Rhs, Urng > binomial (Urng &&urng, int32_t trials, const ArrayBase< Rhs > &p)
 
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 Lhs , typename Rhs , typename Urng >
const CauchyVVType< Lhs, Rhs, Urng > cauchy (Urng &&urng, const ArrayBase< Lhs > &a, const ArrayBase< Rhs > &b)
 generates reals on the Cauchy distribution. More...
 
template<typename Lhs , typename Urng >
const CauchyVSType< Lhs, Urng > cauchy (Urng &&urng, const ArrayBase< Lhs > &a, typename Lhs::Scalar b)
 
template<typename Rhs , typename Urng >
const CauchySVType< Rhs, Urng > cauchy (Urng &&urng, typename Rhs::Scalar a, const ArrayBase< Rhs > &b)
 
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 Lhs , typename Rhs , typename Urng >
const NormalVVType< Lhs, Rhs, Urng > normal (Urng &&urng, const ArrayBase< Lhs > &a, const ArrayBase< Rhs > &b)
 generates reals on a normal distribution with arbitrary mean and stdev. More...
 
template<typename Lhs , typename Urng >
const NormalVSType< Lhs, Urng > normal (Urng &&urng, const ArrayBase< Lhs > &a, typename Lhs::Scalar b)
 
template<typename Rhs , typename Urng >
const NormalSVType< Rhs, Urng > normal (Urng &&urng, typename Rhs::Scalar a, const ArrayBase< Rhs > &b)
 
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 Lhs , typename Rhs , typename Urng >
const LognormalVVType< Lhs, Rhs, Urng > lognormal (Urng &&urng, const ArrayBase< Lhs > &a, const ArrayBase< Rhs > &b)
 generates reals on a lognormal distribution with arbitrary mean and stdev. More...
 
template<typename Lhs , typename Urng >
const LognormalVSType< Lhs, Urng > lognormal (Urng &&urng, const ArrayBase< Lhs > &a, typename Lhs::Scalar b)
 
template<typename Rhs , typename Urng >
const LognormalSVType< Rhs, Urng > lognormal (Urng &&urng, typename Rhs::Scalar a, const ArrayBase< Rhs > &b)
 
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 Lhs , typename Urng >
const StudentTVType< Lhs, Urng > studentT (Urng &&urng, const ArrayBase< Lhs > &a)
 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 Lhs , typename Urng >
const ExponentialVType< Lhs, Urng > exponential (Urng &&urng, const ArrayBase< Lhs > &a)
 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 Lhs , typename Rhs , typename Urng >
const WeibullVVType< Lhs, Rhs, Urng > weibull (Urng &&urng, const ArrayBase< Lhs > &a, const ArrayBase< Rhs > &b)
 generates reals on a Weibull distribution with arbitrary shape and scale parameter. More...
 
template<typename Lhs , typename Urng >
const WeibullVSType< Lhs, Urng > weibull (Urng &&urng, const ArrayBase< Lhs > &a, typename Lhs::Scalar b)
 
template<typename Rhs , typename Urng >
const WeibullSVType< Rhs, Urng > weibull (Urng &&urng, typename Rhs::Scalar a, const ArrayBase< Rhs > &b)
 
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 Lhs , typename Rhs , typename Urng >
const ExtremeValueVVType< Lhs, Rhs, Urng > extremeValue (Urng &&urng, const ArrayBase< Lhs > &a, const ArrayBase< Rhs > &b)
 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 Lhs , typename Urng >
const ExtremeValueVSType< Lhs, Urng > extremeValue (Urng &&urng, const ArrayBase< Lhs > &a, typename Lhs::Scalar b)
 
template<typename Rhs , typename Urng >
const ExtremeValueSVType< Rhs, Urng > extremeValue (Urng &&urng, typename Rhs::Scalar a, const ArrayBase< Rhs > &b)
 
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 makeMvNormalGen (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 makeMvNormalGenFromLt (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() [1/3]

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

◆ balanced() [2/3]

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

generates reals in a range [a, b]

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
a,bleft and right boundary
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::BalancedGen

◆ balanced() [3/3]

template<typename Lhs , typename Rhs , typename Urng >
const BalancedVVType< Lhs, Urng > Eigen::Rand::balanced ( Urng &&  urng,
const ArrayBase< Lhs > &  a,
const ArrayBase< Rhs > &  b 
)
inline

generates reals in a range [a, b]

Template Parameters
Lhs,RhsArrayBase type of lhs and rhs operands
Urng
Parameters
urngc++11-style random number generator
a,bleft and right boundary
Returns
a random matrix expression with the same shape as a and b
Note
a and b should have the same shape and scalar type.
See also
Eigen::Rand::BalancedGen

◆ balancedLike() [1/2]

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

◆ balancedLike() [2/2]

template<typename Derived , typename Urng >
const Balanced2Type< Derived, Urng > Eigen::Rand::balancedLike ( const Derived &  o,
Urng &&  urng,
typename Derived::Scalar  a,
typename Derived::Scalar  b 
)
inline

generates reals in a range [a, b]

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

◆ bernoulli() [1/3]

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

generates 1 with probability p and 0 with probability 1 - p

Template Parameters
Derived
Urng
Parameters
oan instance of any type of Eigen::DenseBase
urngc++11-style random number generator
pa probability of generating 1
Returns
a random matrix expression of the same shape as o

◆ bernoulli() [2/3]

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

generates 1 with probability p and 0 with probability 1 - p

Template Parameters
Derived
Urng
Parameters
rowsthe number of rows being generated
colsthe number of columns being generated
urngc++11-style random number generator
pa probability of generating 1
Returns
a random matrix expression with a shape (rows, cols)

◆ bernoulli() [3/3]

template<typename Lhs , typename Urng >
const BernoulliVType< Lhs, Urng > Eigen::Rand::bernoulli ( Urng &&  urng,
const ArrayBase< Lhs > &  p 
)
inline

generates 1 with probability p and 0 with probability 1 - p

Template Parameters
Lhs
Urng
Parameters
urngc++11-style random number generator
pa probability of generating 1
Returns
a random matrix expression with the same shape as p

◆ 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() [1/2]

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

◆ binomial() [2/2]

template<typename Lhs , typename Rhs , typename Urng >
const BinomialVVType< Lhs, Rhs, Urng > Eigen::Rand::binomial ( Urng &&  urng,
const ArrayBase< Lhs > &  trials,
const ArrayBase< Rhs > &  p 
)
inline

generates reals on the binomial distribution.

Template Parameters
Lhs,Rhs
Urng
Parameters
urngc++11-style random number generator
trialsthe number of trials
pprobability of a trial generating true
Returns
a random matrix expression with the shape as trials and p
Note
trials and p should have the same shape.
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() [1/2]

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

◆ cauchy() [2/2]

template<typename Lhs , typename Rhs , typename Urng >
const CauchyVVType< Lhs, Rhs, Urng > Eigen::Rand::cauchy ( Urng &&  urng,
const ArrayBase< Lhs > &  a,
const ArrayBase< Rhs > &  b 
)
inline

generates reals on the Cauchy distribution.

Template Parameters
Lhs,Rhs
Urng
Parameters
urngc++11-style random number generator
aa location parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression with the same shape as a and b
Note
a and b should have the same shape and scalar type.
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() [1/2]

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

◆ exponential() [2/2]

template<typename Lhs , typename Urng >
const ExponentialVType< Lhs, Urng > Eigen::Rand::exponential ( Urng &&  urng,
const ArrayBase< Lhs > &  a 
)
inline

generates reals on an exponential distribution with arbitrary scale parameter.

Template Parameters
Lhs,Rhs
Urng
Parameters
urngc++11-style random number generator
lambdaa scale parameter of the distribution
Returns
a random matrix expression with the same shape as lambda
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() [1/2]

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

◆ extremeValue() [2/2]

template<typename Lhs , typename Rhs , typename Urng >
const ExtremeValueVVType< Lhs, Rhs, Urng > Eigen::Rand::extremeValue ( Urng &&  urng,
const ArrayBase< Lhs > &  a,
const ArrayBase< Rhs > &  b 
)
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
Lhs,Rhs
Urng
Parameters
urngc++11-style random number generator
aa location parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression with the same shape as a and b
Note
a and b should have the same shape and scalar type.
See also
Eigen::Rand::WeibullGen

◆ 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() [1/2]

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

◆ lognormal() [2/2]

template<typename Lhs , typename Rhs , typename Urng >
const LognormalVVType< Lhs, Rhs, Urng > Eigen::Rand::lognormal ( Urng &&  urng,
const ArrayBase< Lhs > &  a,
const ArrayBase< Rhs > &  b 
)
inline

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

Template Parameters
Lhs,Rhs
Urng
Parameters
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 the same shape as mean and stdev
Note
mean and stdev should have the same shape and scalar type.
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

◆ makeMvNormalGen()

template<typename MeanTy , typename CovTy >
auto Eigen::Rand::makeMvNormalGen ( 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)

◆ makeMvNormalGenFromLt()

template<typename MeanTy , typename LTTy >
auto Eigen::Rand::makeMvNormalGenFromLt ( 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/3]

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/3]

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

◆ normal() [3/3]

template<typename Lhs , typename Rhs , typename Urng >
const NormalVVType< Lhs, Rhs, Urng > Eigen::Rand::normal ( Urng &&  urng,
const ArrayBase< Lhs > &  a,
const ArrayBase< Rhs > &  b 
)
inline

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

Template Parameters
Lhs,Rhs
Urng
Parameters
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 the same shape as mean and stdev
Note
mean and stdev should have the same shape and scalar type.
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() [1/2]

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

◆ studentT() [2/2]

template<typename Lhs , typename Urng >
const StudentTVType< Lhs, Urng > Eigen::Rand::studentT ( Urng &&  urng,
const ArrayBase< Lhs > &  a 
)
inline

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

Template Parameters
Lhs
Urng
Parameters
urngc++11-style random number generator
ndegrees of freedom
Returns
a random matrix expression with the same shape as n
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() [1/3]

template<typename Derived , typename Urng >
const StdUniformRealType< 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

◆ uniformReal() [2/3]

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

generates reals in a 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 reals being generated
Returns
a random matrix expression with a shape (rows, cols)
See also
Eigen::Rand::UniformRealGen

◆ uniformReal() [3/3]

template<typename Lhs , typename Rhs , typename Urng >
const UniformRealVVType< Lhs, Urng > Eigen::Rand::uniformReal ( Urng &&  urng,
const ArrayBase< Lhs > &  a,
const ArrayBase< Rhs > &  b 
)
inline

generates reals in a range [a, b)

Template Parameters
Lhs,RhsArrayBase type of lhs and rhs operands
Urng
Parameters
urngc++11-style random number generator
a,bleft and right boundary
Returns
a random matrix expression with the same shape as a and b
Note
a and b should have the same shape and scalar type.
See also
Eigen::Rand::UniformRealGen

◆ uniformRealLike() [1/2]

template<typename Derived , typename Urng >
const StdUniformRealType< 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

◆ uniformRealLike() [2/2]

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

generates reals in a 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 reals being generated
Returns
a random matrix expression of the same shape as o
See also
Eigen::Rand::UniformRealGen

◆ weibull() [1/2]

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

◆ weibull() [2/2]

template<typename Lhs , typename Rhs , typename Urng >
const WeibullVVType< Lhs, Rhs, Urng > Eigen::Rand::weibull ( Urng &&  urng,
const ArrayBase< Lhs > &  a,
const ArrayBase< Rhs > &  b 
)
inline

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

Template Parameters
Lhs,Rhs
Urng
Parameters
urngc++11-style random number generator
aa shape parameter of the distribution
ba scale parameter of the distribution
Returns
a random matrix expression with the same shape as a and b
Note
a and b should have the same shape and scalar type.
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