71 template<
typename GeneratorType = std::mt19937_64>
116#ifndef NUMCPP_NO_USE_BOOST
129 template<
typename dtype>
130 dtype
beta(dtype inAlpha, dtype inBeta)
149 template<
typename dtype>
152 return detail::beta(generator_, inShape, inAlpha, inBeta);
167 template<
typename dtype>
186 template<
typename dtype>
201 template<
typename dtype>
202 dtype
cauchy(dtype inMean = 0, dtype inSigma = 1)
218 template<
typename dtype>
234 template<
typename dtype>
252 template<
typename dtype>
265 template<
typename dtype>
280 template<
typename dtype>
296 template<
typename dtype>
299 return detail::discrete<dtype>(generator_, inWeights);
314 template<
typename dtype>
317 return detail::discrete<dtype>(generator_, inShape, inWeights);
330 template<
typename dtype>
348 template<
typename dtype>
362 template<
typename dtype>
378 template<
typename dtype>
394 template<
typename dtype>
395 dtype
f(dtype inDofN, dtype inDofD)
397 return detail::f(generator_, inDofN, inDofD);
412 template<
typename dtype>
415 return detail::f(generator_, inShape, inDofN, inDofD);
429 template<
typename dtype>
430 dtype
gamma(dtype inGammaShape, dtype inScaleValue = 1)
432 return detail::gamma(generator_, inGammaShape, inScaleValue);
448 template<
typename dtype>
451 return detail::gamma(generator_, inShape, inGammaShape, inScaleValue);
464 template<
typename dtype>
467 return detail::geometric<dtype>(generator_, inP);
482 template<
typename dtype>
485 return detail::geometric<dtype>(generator_, inShape, inP);
488#ifndef NUMCPP_NO_USE_BOOST
501 template<
typename dtype>
502 dtype
laplace(dtype inLoc = 0, dtype inScale = 1)
521 template<
typename dtype>
540 template<
typename dtype>
560 template<
typename dtype>
577 template<
typename dtype>
596 template<
typename dtype>
602#ifndef NUMCPP_NO_USE_BOOST
615 template<
typename dtype>
635 template<
typename dtype>
654 template<
typename dtype>
655 dtype
normal(dtype inMean = 0, dtype inSigma = 1)
674 template<
typename dtype>
689 template<
typename dtype>
704 template<
typename dtype>
720 template<
typename dtype>
723 return detail::poisson<dtype>(generator_, inMean);
738 template<
typename dtype>
741 return detail::poisson<dtype>(generator_, inShape, inMean);
753 template<
typename dtype>
756 return detail::rand<dtype>(generator_);
770 template<
typename dtype>
773 return detail::rand<dtype>(generator_, inShape);
789 template<
typename dtype>
809 template<
typename dtype>
828 template<
typename dtype>
848 template<
typename dtype>
863 template<
typename dtype>
866 return detail::randN<dtype>(generator_);
880 template<
typename dtype>
883 return detail::randN<dtype>(generator_, inShape);
894 generator_.seed(value);
903 template<
typename dtype>
919 template<
typename dtype>
922 return detail::standardNormal<dtype>(generator_);
937 template<
typename dtype>
940 return detail::standardNormal<dtype>(generator_, inShape);
953 template<
typename dtype>
971 template<
typename dtype>
977#ifndef NUMCPP_NO_USE_BOOST
991 template<
typename dtype>
992 dtype
triangle(dtype inA = 0, dtype inB = 0.5, dtype inC = 1)
1012 template<
typename dtype>
1033 template<
typename dtype>
1054 template<
typename dtype>
1060#ifndef NUMCPP_NO_USE_BOOST
1071 template<
typename dtype>
1074 return detail::uniformOnSphere<dtype>(generator_, inNumPoints, inDims);
1089 template<
typename dtype>
1108 template<
typename dtype>
1115 GeneratorType generator_{};
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
dtype randFloat(dtype inLow, dtype inHigh=0.)
Definition: RNG.hpp:790
dtype normal(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:655
NdArray< dtype > discrete(const Shape &inShape, const NdArray< double > &inWeights)
Definition: RNG.hpp:315
dtype gamma(dtype inGammaShape, dtype inScaleValue=1)
Definition: RNG.hpp:430
bool bernoulli(double inP=0.5)
Definition: RNG.hpp:97
NdArray< dtype > triangle(const Shape &inShape, dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: RNG.hpp:1013
dtype triangle(dtype inA=0, dtype inB=0.5, dtype inC=1)
Definition: RNG.hpp:992
dtype randInt(dtype inLow, dtype inHigh=0)
Definition: RNG.hpp:829
NdArray< dtype > cauchy(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:219
NdArray< dtype > binomial(const Shape &inShape, dtype inN, double inP=0.5)
Definition: RNG.hpp:187
NdArray< dtype > lognormal(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:561
NdArray< dtype > chiSquare(const Shape &inShape, dtype inDof)
Definition: RNG.hpp:253
dtype choice(const NdArray< dtype > &inArray)
Definition: RNG.hpp:266
NdArray< dtype > randInt(const Shape &inShape, dtype inLow, dtype inHigh=0)
Definition: RNG.hpp:849
dtype beta(dtype inAlpha, dtype inBeta)
Definition: RNG.hpp:130
dtype lognormal(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:541
NdArray< dtype > standardNormal(const Shape &inShape)
Definition: RNG.hpp:938
dtype studentT(dtype inDof)
Definition: RNG.hpp:954
dtype negativeBinomial(dtype inN, double inP=0.5)
Definition: RNG.hpp:578
dtype rand()
Definition: RNG.hpp:754
NdArray< dtype > permutation(const NdArray< dtype > &inArray)
Definition: RNG.hpp:705
NdArray< dtype > rand(const Shape &inShape)
Definition: RNG.hpp:771
NdArray< dtype > randFloat(const Shape &inShape, dtype inLow, dtype inHigh=0.)
Definition: RNG.hpp:810
dtype f(dtype inDofN, dtype inDofD)
Definition: RNG.hpp:395
dtype binomial(dtype inN, double inP=0.5)
Definition: RNG.hpp:168
NdArray< dtype > beta(const Shape &inShape, dtype inAlpha, dtype inBeta)
Definition: RNG.hpp:150
dtype randN()
Definition: RNG.hpp:864
RNG(int seed)
Definition: RNG.hpp:87
NdArray< dtype > uniform(const Shape &inShape, dtype inLow, dtype inHigh)
Definition: RNG.hpp:1055
NdArray< dtype > nonCentralChiSquared(const Shape &inShape, dtype inK=1, dtype inLambda=1)
Definition: RNG.hpp:636
dtype geometric(double inP=0.5)
Definition: RNG.hpp:465
dtype chiSquare(dtype inDof)
Definition: RNG.hpp:235
dtype cauchy(dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:202
dtype exponential(dtype inScaleValue=1)
Definition: RNG.hpp:331
NdArray< dtype > extremeValue(const Shape &inShape, dtype inA=1, dtype inB=1)
Definition: RNG.hpp:379
NdArray< dtype > randN(const Shape &inShape)
Definition: RNG.hpp:881
dtype uniform(dtype inLow, dtype inHigh)
Definition: RNG.hpp:1034
NdArray< dtype > gamma(const Shape &inShape, dtype inGammaShape, dtype inScaleValue=1)
Definition: RNG.hpp:449
NdArray< dtype > choice(const NdArray< dtype > &inArray, uint32 inNum, Replace replace=Replace::YES)
Definition: RNG.hpp:281
NdArray< dtype > studentT(const Shape &inShape, dtype inDof)
Definition: RNG.hpp:972
NdArray< dtype > permutation(dtype inValue)
Definition: RNG.hpp:690
NdArray< dtype > normal(const Shape &inShape, dtype inMean=0, dtype inSigma=1)
Definition: RNG.hpp:675
NdArray< dtype > negativeBinomial(const Shape &inShape, dtype inN, double inP=0.5)
Definition: RNG.hpp:597
void seed(int value) noexcept
Definition: RNG.hpp:892
dtype discrete(const NdArray< double > &inWeights)
Definition: RNG.hpp:297
dtype laplace(dtype inLoc=0, dtype inScale=1)
Definition: RNG.hpp:502
NdArray< dtype > laplace(const Shape &inShape, dtype inLoc=0, dtype inScale=1)
Definition: RNG.hpp:522
dtype weibull(dtype inA=1, dtype inB=1)
Definition: RNG.hpp:1090
NdArray< dtype > geometric(const Shape &inShape, double inP=0.5)
Definition: RNG.hpp:483
NdArray< bool > bernoulli(const Shape &inShape, double inP=0.5)
Definition: RNG.hpp:111
NdArray< dtype > weibull(const Shape &inShape, dtype inA=1, dtype inB=1)
Definition: RNG.hpp:1109
dtype standardNormal()
Definition: RNG.hpp:920
void shuffle(NdArray< dtype > &inArray)
Definition: RNG.hpp:904
NdArray< dtype > uniformOnSphere(uint32 inNumPoints, uint32 inDims=2)
Definition: RNG.hpp:1072
NdArray< dtype > exponential(const Shape &inShape, dtype inScaleValue=1)
Definition: RNG.hpp:349
dtype extremeValue(dtype inA=1, dtype inB=1)
Definition: RNG.hpp:363
dtype poisson(double inMean=1)
Definition: RNG.hpp:721
NdArray< dtype > f(const Shape &inShape, dtype inDofN, dtype inDofD)
Definition: RNG.hpp:413
NdArray< dtype > poisson(const Shape &inShape, double inMean=1)
Definition: RNG.hpp:739
dtype nonCentralChiSquared(dtype inK=1, dtype inLambda=1)
Definition: RNG.hpp:616
dtype choice(GeneratorType &generator, const NdArray< dtype > &inArray)
Definition: choice.hpp:53
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
Replace
Replace boolean.
Definition: Enums.hpp:101
NdArray< dtype > replace(const NdArray< dtype > &inArray, dtype oldValue, dtype newValue)
Definition: replace.hpp:45
std::uint32_t uint32
Definition: Types.hpp:40