25template <
typename Real_t>
28template<
typename Real_t>
31 if (!fgRandomGen) fgRandomGen =
new TRandom3();
32 fgRandomGen->SetSeed(seed);
34template<
typename Real_t>
37 if (!fgRandomGen) fgRandomGen =
new TRandom3(0);
42template<
typename Real_t>
49 TRandom & rand = GetRandomGenerator();
53 for (
size_t i = 0; i <
m; i++) {
54 for (
size_t j = 0; j <
n; j++) {
61template<
typename Real_t>
68 TRandom & rand = GetRandomGenerator();
72 for (
size_t i = 0; i <
m; i++) {
73 for (
size_t j = 0; j <
n; j++) {
74 A(i,j) = rand.
Uniform(-range, range);
84template<
typename Real_t>
91 TRandom & rand = GetRandomGenerator();
95 for (
size_t i = 0; i <
m; i++) {
96 for (
size_t j = 0; j <
n; j++) {
109template<
typename Real_t>
116 TRandom & rand = GetRandomGenerator();
120 for (
size_t i = 0; i <
m; i++) {
121 for (
size_t j = 0; j <
n; j++) {
122 A(i,j) = rand.
Uniform(-range, range);
128template<
typename Real_t>
135 for (
size_t i = 0; i <
m; i++) {
136 for (
size_t j = 0; j <
n ; j++) {
147template<
typename Real_t>
154 for (
size_t i = 0; i <
m; i++) {
155 for (
size_t j = 0; j <
n ; j++) {
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
static void InitializeIdentity(TMatrixT< AReal > &A)
static void InitializeGlorotNormal(TMatrixT< AReal > &A)
Truncated normal initialization (Glorot, called also Xavier normal) The values are sample with a norm...
static void SetRandomSeed(size_t seed)
static void InitializeZero(TMatrixT< AReal > &A)
static TRandom * fgRandomGen
static void InitializeGauss(TMatrixT< AReal > &A)
static void InitializeGlorotUniform(TMatrixT< AReal > &A)
Sample from a uniform distribution in range [ -lim,+lim] where lim = sqrt(6/N_in+N_out).
static TRandom & GetRandomGenerator()
static void InitializeUniform(TMatrixT< AReal > &A)
Random number generator class based on M.
This is the base class for the ROOT Random number generators.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
create variable transformations