72 template<
typename GeneratorType = std::mt19937_64>
117 #ifndef NUMCPP_NO_USE_BOOST
130 template<
typename dtype>
131 dtype
beta(dtype inAlpha, dtype inBeta)
150 template<
typename dtype>
153 return detail::beta(generator_, inShape, inAlpha, inBeta);
168 template<
typename dtype>
187 template<
typename dtype>
202 template<
typename dtype>
203 dtype
cauchy(dtype inMean = 0, dtype inSigma = 1)
219 template<
typename dtype>
235 template<
typename dtype>
253 template<
typename dtype>
266 template<
typename dtype>
281 template<
typename dtype>
297 template<
typename dtype>
300 return detail::discrete<dtype>(generator_, inWeights);
315 template<
typename dtype>
318 return detail::discrete<dtype>(generator_, inShape, inWeights);
331 template<
typename dtype>
349 template<
typename dtype>
363 template<
typename dtype>
379 template<
typename dtype>
395 template<
typename dtype>
396 dtype
f(dtype inDofN, dtype inDofD)
398 return detail::f(generator_, inDofN, inDofD);
413 template<
typename dtype>
416 return detail::f(generator_, inShape, inDofN, inDofD);
430 template<
typename dtype>
431 dtype
gamma(dtype inGammaShape, dtype inScaleValue = 1)
433 return detail::gamma(generator_, inGammaShape, inScaleValue);
449 template<
typename dtype>
452 return detail::gamma(generator_, inShape, inGammaShape, inScaleValue);
465 template<
typename dtype>
468 return detail::geometric<dtype>(generator_, inP);
483 template<
typename dtype>
486 return detail::geometric<dtype>(generator_, inShape, inP);
489 #ifndef NUMCPP_NO_USE_BOOST
502 template<
typename dtype>
503 dtype
laplace(dtype inLoc = 0, dtype inScale = 1)
522 template<
typename dtype>
541 template<
typename dtype>
561 template<
typename dtype>
578 template<
typename dtype>
597 template<
typename dtype>
603 #ifndef NUMCPP_NO_USE_BOOST
616 template<
typename dtype>
636 template<
typename dtype>
655 template<
typename dtype>
656 dtype
normal(dtype inMean = 0, dtype inSigma = 1)
675 template<
typename dtype>
690 template<
typename dtype>
705 template<
typename dtype>
721 template<
typename dtype>
724 return detail::poisson<dtype>(generator_, inMean);
739 template<
typename dtype>
742 return detail::poisson<dtype>(generator_, inShape, inMean);
754 template<
typename dtype>
757 return detail::rand<dtype>(generator_);
771 template<
typename dtype>
774 return detail::rand<dtype>(generator_, inShape);
790 template<
typename dtype>
810 template<
typename dtype>
829 template<
typename dtype>
849 template<
typename dtype>
864 template<
typename dtype>
867 return detail::randN<dtype>(generator_);
881 template<
typename dtype>
884 return detail::randN<dtype>(generator_, inShape);
895 generator_.seed(value);
904 template<
typename dtype>
920 template<
typename dtype>
923 return detail::standardNormal<dtype>(generator_);
938 template<
typename dtype>
941 return detail::standardNormal<dtype>(generator_, inShape);
954 template<
typename dtype>
972 template<
typename dtype>
978 #ifndef NUMCPP_NO_USE_BOOST
992 template<
typename dtype>
993 dtype
triangle(dtype inA = 0, dtype inB = 0.5, dtype inC = 1)
1013 template<
typename dtype>
1034 template<
typename dtype>
1055 template<
typename dtype>
1061 #ifndef NUMCPP_NO_USE_BOOST
1072 template<
typename dtype>
1075 return detail::uniformOnSphere<dtype>(generator_, inNumPoints, inDims);
1090 template<
typename dtype>
1109 template<
typename dtype>
1116 GeneratorType generator_{};
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
dtype randFloat(dtype inLow, dtype inHigh=0.)
Definition: RNG.hpp:791
dtype normal(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:656
dtype gamma(dtype inGammaShape, dtype inScaleValue=1)
Definition: RNG.hpp:431
NdArray< dtype > binomial(const Shape &inShape, dtype inN, double inP=0.5)
Definition: RNG.hpp:188
bool bernoulli(double inP=0.5)
Definition: RNG.hpp:98
NdArray< dtype > standardNormal(const Shape &inShape)
Definition: RNG.hpp:939
dtype triangle(dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: RNG.hpp:993
NdArray< dtype > randN(const Shape &inShape)
Definition: RNG.hpp:882
dtype randInt(dtype inLow, dtype inHigh=0)
Definition: RNG.hpp:830
NdArray< dtype > choice(const NdArray< dtype > &inArray, uint32 inNum, bool replace=true)
Definition: RNG.hpp:282
NdArray< dtype > uniformOnSphere(uint32 inNumPoints, uint32 inDims=2)
Definition: RNG.hpp:1073
dtype choice(const NdArray< dtype > &inArray)
Definition: RNG.hpp:267
dtype beta(dtype inAlpha, dtype inBeta)
Definition: RNG.hpp:131
NdArray< dtype > uniform(const Shape &inShape, dtype inLow, dtype inHigh)
Definition: RNG.hpp:1056
dtype lognormal(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:542
NdArray< dtype > beta(const Shape &inShape, dtype inAlpha, dtype inBeta)
Definition: RNG.hpp:151
dtype studentT(dtype inDof)
Definition: RNG.hpp:955
dtype negativeBinomial(dtype inN, double inP=0.5)
Definition: RNG.hpp:579
dtype rand()
Definition: RNG.hpp:755
dtype f(dtype inDofN, dtype inDofD)
Definition: RNG.hpp:396
NdArray< dtype > exponential(const Shape &inShape, dtype inScaleValue=1)
Definition: RNG.hpp:350
NdArray< bool > bernoulli(const Shape &inShape, double inP=0.5)
Definition: RNG.hpp:112
dtype binomial(dtype inN, double inP=0.5)
Definition: RNG.hpp:169
dtype randN()
Definition: RNG.hpp:865
RNG(int seed)
Definition: RNG.hpp:88
NdArray< dtype > poisson(const Shape &inShape, double inMean=1)
Definition: RNG.hpp:740
NdArray< dtype > lognormal(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:562
NdArray< dtype > normal(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:676
NdArray< dtype > geometric(const Shape &inShape, double inP=0.5)
Definition: RNG.hpp:484
NdArray< dtype > negativeBinomial(const Shape &inShape, dtype inN, double inP=0.5)
Definition: RNG.hpp:598
dtype geometric(double inP=0.5)
Definition: RNG.hpp:466
NdArray< dtype > randInt(const Shape &inShape, dtype inLow, dtype inHigh=0)
Definition: RNG.hpp:850
dtype chiSquare(dtype inDof)
Definition: RNG.hpp:236
dtype cauchy(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:203
dtype exponential(dtype inScaleValue=1)
Definition: RNG.hpp:332
NdArray< dtype > gamma(const Shape &inShape, dtype inGammaShape, dtype inScaleValue=1)
Definition: RNG.hpp:450
dtype uniform(dtype inLow, dtype inHigh)
Definition: RNG.hpp:1035
NdArray< dtype > chiSquare(const Shape &inShape, dtype inDof)
Definition: RNG.hpp:254
NdArray< dtype > cauchy(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:220
void seed(int value) noexcept
Definition: RNG.hpp:893
dtype discrete(const NdArray< double > &inWeights)
Definition: RNG.hpp:298
dtype laplace(dtype inLoc=0, dtype inScale=1)
Definition: RNG.hpp:503
NdArray< dtype > permutation(dtype inValue)
Definition: RNG.hpp:691
dtype weibull(dtype inA=1, dtype inB=1)
Definition: RNG.hpp:1091
NdArray< dtype > studentT(const Shape &inShape, dtype inDof)
Definition: RNG.hpp:973
NdArray< dtype > triangle(const Shape &inShape, dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: RNG.hpp:1014
NdArray< dtype > extremeValue(const Shape &inShape, dtype inA=1, dtype inB=1)
Definition: RNG.hpp:380
NdArray< dtype > rand(const Shape &inShape)
Definition: RNG.hpp:772
dtype standardNormal()
Definition: RNG.hpp:921
void shuffle(NdArray< dtype > &inArray)
Definition: RNG.hpp:905
NdArray< dtype > discrete(const Shape &inShape, const NdArray< double > &inWeights)
Definition: RNG.hpp:316
NdArray< dtype > nonCentralChiSquared(const Shape &inShape, dtype inK=1, dtype inLambda=1)
Definition: RNG.hpp:637
dtype extremeValue(dtype inA=1, dtype inB=1)
Definition: RNG.hpp:364
dtype poisson(double inMean=1)
Definition: RNG.hpp:722
NdArray< dtype > randFloat(const Shape &inShape, dtype inLow, dtype inHigh=0.)
Definition: RNG.hpp:811
NdArray< dtype > f(const Shape &inShape, dtype inDofN, dtype inDofD)
Definition: RNG.hpp:414
NdArray< dtype > weibull(const Shape &inShape, dtype inA=1, dtype inB=1)
Definition: RNG.hpp:1110
dtype nonCentralChiSquared(dtype inK=1, dtype inLambda=1)
Definition: RNG.hpp:617
NdArray< dtype > laplace(const Shape &inShape, dtype inLoc=0, dtype inScale=1)
Definition: RNG.hpp:523
NdArray< dtype > permutation(const NdArray< dtype > &inArray)
Definition: RNG.hpp:706
dtype choice(GeneratorType &generator, const NdArray< dtype > &inArray)
Definition: choice.hpp:54
NdArray< dtype > permutation(GeneratorType &generator, dtype inValue)
Definition: permutation.hpp:54
dtype beta(GeneratorType &generator, dtype inAlpha, dtype inBeta)
Definition: Random/beta.hpp:63
dtype triangle(GeneratorType &generator, dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: triangle.hpp:65
dtype cauchy(GeneratorType &generator, dtype inMean=0, dtype inSigma=1)
Definition: cauchy.hpp:57
dtype binomial(GeneratorType &generator, dtype inN, double inP=0.5)
Definition: binomial.hpp:59
dtype chiSquare(GeneratorType &generator, dtype inDof)
Definition: chiSquare.hpp:58
void shuffle(GeneratorType &generator, NdArray< dtype > &inArray)
Definition: shuffle.hpp:50
bool bernoulli(GeneratorType &generator, double inP=0.5)
Definition: Random/bernoulli.hpp:55
dtype randInt(GeneratorType &generator, dtype inLow, dtype inHigh=0)
Definition: randInt.hpp:63
dtype randFloat(GeneratorType &generator, dtype inLow, dtype inHigh=0.)
Definition: randFloat.hpp:63
dtype weibull(GeneratorType &generator, dtype inA=1, dtype inB=1)
Definition: weibull.hpp:58
dtype nonCentralChiSquared(GeneratorType &generator, dtype inK=1, dtype inLambda=1)
Definition: nonCentralChiSquared.hpp:63
dtype laplace(GeneratorType &generator, dtype inLoc=0, dtype inScale=1)
Definition: Random/laplace.hpp:61
dtype normal(GeneratorType &generator, dtype inMean=0, dtype inSigma=1)
Definition: normal.hpp:60
dtype uniform(GeneratorType &generator, dtype inLow, dtype inHigh)
Definition: uniform.hpp:56
dtype extremeValue(GeneratorType &generator, dtype inA=1, dtype inB=1)
Definition: extremeValue.hpp:56
dtype studentT(GeneratorType &generator, dtype inDof)
Definition: studentT.hpp:57
dtype gamma(GeneratorType &generator, dtype inGammaShape, dtype inScaleValue=1)
Definition: Random/gamma.hpp:59
dtype negativeBinomial(GeneratorType &generator, dtype inN, double inP=0.5)
Definition: negativeBinomial.hpp:59
dtype lognormal(GeneratorType &generator, dtype inMean=0, dtype inSigma=1)
Definition: lognormal.hpp:60
dtype exponential(GeneratorType &generator, dtype inScaleValue=1)
Definition: exponential.hpp:56
dtype f(GeneratorType &generator, dtype inDofN, dtype inDofD)
Definition: f.hpp:58
Definition: Coordinate.hpp:45
NdArray< dtype > replace(const NdArray< dtype > &inArray, dtype oldValue, dtype newValue)
Definition: replace.hpp:45
std::uint32_t uint32
Definition: Types.hpp:40