10 for(
unsigned int i = start; i < len+start; ++i)
11 v[i] = r.
Rndm() + offset;
15 void fillRandomMat(
TRandom & r, M & m,
unsigned int first,
unsigned int second,
unsigned int start = 0,
double offset = 1) {
16 for(
unsigned int i = start; i < first+start; ++i)
17 for(
unsigned int j = start; j < second+start; ++j)
18 m(i,j) = r.
Rndm() + offset;
23 for(
unsigned int i = start; i < first+start; ++i) {
24 for(
unsigned int j = i; j < first+start; ++j) {
26 m(i,j) = r.
Rndm() + offset;
30 m(i,i) = r.
Rndm() + 3*offset;
39 void fillRandomVec(
TRandom & r, V & v,
unsigned int len,
unsigned int start = 0,
double offset = 1) {
41 for(
unsigned int i = start; i < len+start; ++i) {
42 typename V::value_type
x = v[i];
43 x[k] = r.
Rndm() + offset;
50 void fillRandomMat(
TRandom & r, M & m,
unsigned int first,
unsigned int second,
unsigned int start = 0,
double offset = 1) {
52 for(
unsigned int i = start; i < first+start; ++i) {
53 for(
unsigned int j = start; j < second+start; ++j) {
54 typename M::value_type
x =
m(i,j);
55 x[k] = r.
Rndm() + offset;
63 void fillRandomSym(
TRandom & r, M & m,
unsigned int first,
unsigned int start = 0,
double offset = 1) {
65 for(
unsigned int i = start; i < first+start; ++i) {
66 for(
unsigned int j = i; j < first+start; ++j) {
67 typename M::value_type
x =
m(i,j);
69 x[k] = r.
Rndm() + offset;
74 x[k] = r.
Rndm() + 3*offset;
virtual Double_t Rndm(Int_t i=0)
Machine independent random number generator.
void fillRandomVec(TRandom &r, V &v, unsigned int len, unsigned int start=0, double offset=1)
void fillRandomSym(TRandom &r, M &m, unsigned int first, unsigned int start=0, double offset=1)
This is the base class for the ROOT Random number generators.
void fillRandomMat(TRandom &r, M &m, unsigned int first, unsigned int second, unsigned int start=0, double offset=1)