70 template<
typename GeneratorType = std::mt19937_64>
115 #ifndef NUMCPP_NO_USE_BOOST
128 template<
typename dtype>
129 dtype
beta(dtype inAlpha, dtype inBeta)
148 template<
typename dtype>
151 return detail::beta(generator_, inShape, inAlpha, inBeta);
166 template<
typename dtype>
185 template<
typename dtype>
200 template<
typename dtype>
201 dtype
cauchy(dtype inMean = 0, dtype inSigma = 1)
217 template<
typename dtype>
233 template<
typename dtype>
251 template<
typename dtype>
264 template<
typename dtype>
279 template<
typename dtype>
295 template<
typename dtype>
298 return detail::discrete<dtype>(generator_, inWeights);
313 template<
typename dtype>
316 return detail::discrete<dtype>(generator_, inShape, inWeights);
329 template<
typename dtype>
347 template<
typename dtype>
361 template<
typename dtype>
377 template<
typename dtype>
393 template<
typename dtype>
394 dtype
f(dtype inDofN, dtype inDofD)
396 return detail::f(generator_, inDofN, inDofD);
411 template<
typename dtype>
414 return detail::f(generator_, inShape, inDofN, inDofD);
428 template<
typename dtype>
429 dtype
gamma(dtype inGammaShape, dtype inScaleValue = 1)
431 return detail::gamma(generator_, inGammaShape, inScaleValue);
447 template<
typename dtype>
450 return detail::gamma(generator_, inShape, inGammaShape, inScaleValue);
463 template<
typename dtype>
466 return detail::geometric<dtype>(generator_, inP);
481 template<
typename dtype>
484 return detail::geometric<dtype>(generator_, inShape, inP);
487 #ifndef NUMCPP_NO_USE_BOOST
500 template<
typename dtype>
501 dtype
laplace(dtype inLoc = 0, dtype inScale = 1)
520 template<
typename dtype>
539 template<
typename dtype>
559 template<
typename dtype>
576 template<
typename dtype>
595 template<
typename dtype>
601 #ifndef NUMCPP_NO_USE_BOOST
614 template<
typename dtype>
634 template<
typename dtype>
653 template<
typename dtype>
654 dtype
normal(dtype inMean = 0, dtype inSigma = 1)
673 template<
typename dtype>
688 template<
typename dtype>
703 template<
typename dtype>
719 template<
typename dtype>
722 return detail::poisson<dtype>(generator_, inMean);
737 template<
typename dtype>
740 return detail::poisson<dtype>(generator_, inShape, inMean);
752 template<
typename dtype>
755 return detail::rand<dtype>(generator_);
769 template<
typename dtype>
772 return detail::rand<dtype>(generator_, inShape);
788 template<
typename dtype>
808 template<
typename dtype>
827 template<
typename dtype>
847 template<
typename dtype>
862 template<
typename dtype>
865 return detail::randN<dtype>(generator_);
879 template<
typename dtype>
882 return detail::randN<dtype>(generator_, inShape);
893 generator_.seed(value);
902 template<
typename dtype>
918 template<
typename dtype>
921 return detail::standardNormal<dtype>(generator_);
936 template<
typename dtype>
939 return detail::standardNormal<dtype>(generator_, inShape);
952 template<
typename dtype>
970 template<
typename dtype>
976 #ifndef NUMCPP_NO_USE_BOOST
990 template<
typename dtype>
991 dtype
triangle(dtype inA = 0, dtype inB = 0.5, dtype inC = 1)
1011 template<
typename dtype>
1032 template<
typename dtype>
1053 template<
typename dtype>
1059 #ifndef NUMCPP_NO_USE_BOOST
1070 template<
typename dtype>
1073 return detail::uniformOnSphere<dtype>(generator_, inNumPoints, inDims);
1088 template<
typename dtype>
1107 template<
typename dtype>
1114 GeneratorType generator_{};
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
dtype randFloat(dtype inLow, dtype inHigh=0.)
Definition: RNG.hpp:789
dtype normal(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:654
dtype gamma(dtype inGammaShape, dtype inScaleValue=1)
Definition: RNG.hpp:429
NdArray< dtype > binomial(const Shape &inShape, dtype inN, double inP=0.5)
Definition: RNG.hpp:186
bool bernoulli(double inP=0.5)
Definition: RNG.hpp:96
NdArray< dtype > standardNormal(const Shape &inShape)
Definition: RNG.hpp:937
dtype triangle(dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: RNG.hpp:991
NdArray< dtype > randN(const Shape &inShape)
Definition: RNG.hpp:880
dtype randInt(dtype inLow, dtype inHigh=0)
Definition: RNG.hpp:828
NdArray< dtype > choice(const NdArray< dtype > &inArray, uint32 inNum, bool replace=true)
Definition: RNG.hpp:280
NdArray< dtype > uniformOnSphere(uint32 inNumPoints, uint32 inDims=2)
Definition: RNG.hpp:1071
dtype choice(const NdArray< dtype > &inArray)
Definition: RNG.hpp:265
dtype beta(dtype inAlpha, dtype inBeta)
Definition: RNG.hpp:129
NdArray< dtype > uniform(const Shape &inShape, dtype inLow, dtype inHigh)
Definition: RNG.hpp:1054
dtype lognormal(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:540
NdArray< dtype > beta(const Shape &inShape, dtype inAlpha, dtype inBeta)
Definition: RNG.hpp:149
dtype studentT(dtype inDof)
Definition: RNG.hpp:953
dtype negativeBinomial(dtype inN, double inP=0.5)
Definition: RNG.hpp:577
dtype rand()
Definition: RNG.hpp:753
dtype f(dtype inDofN, dtype inDofD)
Definition: RNG.hpp:394
NdArray< dtype > exponential(const Shape &inShape, dtype inScaleValue=1)
Definition: RNG.hpp:348
NdArray< bool > bernoulli(const Shape &inShape, double inP=0.5)
Definition: RNG.hpp:110
dtype binomial(dtype inN, double inP=0.5)
Definition: RNG.hpp:167
dtype randN()
Definition: RNG.hpp:863
RNG(int seed)
Definition: RNG.hpp:86
NdArray< dtype > poisson(const Shape &inShape, double inMean=1)
Definition: RNG.hpp:738
NdArray< dtype > lognormal(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:560
NdArray< dtype > normal(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:674
NdArray< dtype > geometric(const Shape &inShape, double inP=0.5)
Definition: RNG.hpp:482
NdArray< dtype > negativeBinomial(const Shape &inShape, dtype inN, double inP=0.5)
Definition: RNG.hpp:596
dtype geometric(double inP=0.5)
Definition: RNG.hpp:464
NdArray< dtype > randInt(const Shape &inShape, dtype inLow, dtype inHigh=0)
Definition: RNG.hpp:848
dtype chiSquare(dtype inDof)
Definition: RNG.hpp:234
dtype cauchy(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:201
dtype exponential(dtype inScaleValue=1)
Definition: RNG.hpp:330
NdArray< dtype > gamma(const Shape &inShape, dtype inGammaShape, dtype inScaleValue=1)
Definition: RNG.hpp:448
dtype uniform(dtype inLow, dtype inHigh)
Definition: RNG.hpp:1033
NdArray< dtype > chiSquare(const Shape &inShape, dtype inDof)
Definition: RNG.hpp:252
NdArray< dtype > cauchy(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:218
void seed(int value) noexcept
Definition: RNG.hpp:891
dtype discrete(const NdArray< double > &inWeights)
Definition: RNG.hpp:296
dtype laplace(dtype inLoc=0, dtype inScale=1)
Definition: RNG.hpp:501
NdArray< dtype > permutation(dtype inValue)
Definition: RNG.hpp:689
dtype weibull(dtype inA=1, dtype inB=1)
Definition: RNG.hpp:1089
NdArray< dtype > studentT(const Shape &inShape, dtype inDof)
Definition: RNG.hpp:971
NdArray< dtype > triangle(const Shape &inShape, dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: RNG.hpp:1012
NdArray< dtype > extremeValue(const Shape &inShape, dtype inA=1, dtype inB=1)
Definition: RNG.hpp:378
NdArray< dtype > rand(const Shape &inShape)
Definition: RNG.hpp:770
dtype standardNormal()
Definition: RNG.hpp:919
void shuffle(NdArray< dtype > &inArray)
Definition: RNG.hpp:903
NdArray< dtype > discrete(const Shape &inShape, const NdArray< double > &inWeights)
Definition: RNG.hpp:314
NdArray< dtype > nonCentralChiSquared(const Shape &inShape, dtype inK=1, dtype inLambda=1)
Definition: RNG.hpp:635
dtype extremeValue(dtype inA=1, dtype inB=1)
Definition: RNG.hpp:362
dtype poisson(double inMean=1)
Definition: RNG.hpp:720
NdArray< dtype > randFloat(const Shape &inShape, dtype inLow, dtype inHigh=0.)
Definition: RNG.hpp:809
NdArray< dtype > f(const Shape &inShape, dtype inDofN, dtype inDofD)
Definition: RNG.hpp:412
NdArray< dtype > weibull(const Shape &inShape, dtype inA=1, dtype inB=1)
Definition: RNG.hpp:1108
dtype nonCentralChiSquared(dtype inK=1, dtype inLambda=1)
Definition: RNG.hpp:615
NdArray< dtype > laplace(const Shape &inShape, dtype inLoc=0, dtype inScale=1)
Definition: RNG.hpp:521
NdArray< dtype > permutation(const NdArray< dtype > &inArray)
Definition: RNG.hpp:704
dtype choice(GeneratorType &generator, const NdArray< dtype > &inArray)
Definition: choice.hpp:52
NdArray< dtype > permutation(GeneratorType &generator, dtype inValue)
Definition: permutation.hpp:52
dtype beta(GeneratorType &generator, dtype inAlpha, dtype inBeta)
Definition: Random/beta.hpp:61
dtype triangle(GeneratorType &generator, dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: triangle.hpp:63
dtype cauchy(GeneratorType &generator, dtype inMean=0, dtype inSigma=1)
Definition: cauchy.hpp:55
dtype binomial(GeneratorType &generator, dtype inN, double inP=0.5)
Definition: binomial.hpp:57
dtype chiSquare(GeneratorType &generator, dtype inDof)
Definition: chiSquare.hpp:56
void shuffle(GeneratorType &generator, NdArray< dtype > &inArray)
Definition: shuffle.hpp:48
bool bernoulli(GeneratorType &generator, double inP=0.5)
Definition: Random/bernoulli.hpp:53
dtype randInt(GeneratorType &generator, dtype inLow, dtype inHigh=0)
Definition: randInt.hpp:61
dtype randFloat(GeneratorType &generator, dtype inLow, dtype inHigh=0.)
Definition: randFloat.hpp:61
dtype weibull(GeneratorType &generator, dtype inA=1, dtype inB=1)
Definition: weibull.hpp:56
dtype nonCentralChiSquared(GeneratorType &generator, dtype inK=1, dtype inLambda=1)
Definition: nonCentralChiSquared.hpp:61
dtype laplace(GeneratorType &generator, dtype inLoc=0, dtype inScale=1)
Definition: Random/laplace.hpp:59
dtype normal(GeneratorType &generator, dtype inMean=0, dtype inSigma=1)
Definition: normal.hpp:58
dtype uniform(GeneratorType &generator, dtype inLow, dtype inHigh)
Definition: uniform.hpp:54
dtype extremeValue(GeneratorType &generator, dtype inA=1, dtype inB=1)
Definition: extremeValue.hpp:54
dtype studentT(GeneratorType &generator, dtype inDof)
Definition: studentT.hpp:55
dtype gamma(GeneratorType &generator, dtype inGammaShape, dtype inScaleValue=1)
Definition: Random/gamma.hpp:57
dtype negativeBinomial(GeneratorType &generator, dtype inN, double inP=0.5)
Definition: negativeBinomial.hpp:57
dtype lognormal(GeneratorType &generator, dtype inMean=0, dtype inSigma=1)
Definition: lognormal.hpp:58
dtype exponential(GeneratorType &generator, dtype inScaleValue=1)
Definition: exponential.hpp:54
dtype f(GeneratorType &generator, dtype inDofN, dtype inDofD)
Definition: f.hpp:56
Definition: Random/bernoulli.hpp:41
NdArray< dtype > replace(const NdArray< dtype > &inArray, dtype oldValue, dtype newValue)
Definition: replace.hpp:45
std::uint32_t uint32
Definition: Types.hpp:40