OpendTect
6.6
|
Uniform Random Generator. More...
Public Member Functions | |
RandGen () | |
virtual double | get () const |
Uniform [0-1]. More... | |
int | getIndex (int sz) const |
random index in the range [0,sz> More... | |
od_int64 | getIndex (od_int64 sz) const |
random index in the range [0,sz> More... | |
int | getIndexFast (int sz, int seed) const |
getIndex using a very simple random generator More... | |
od_int64 | getIndexFast (od_int64 sz, od_int64 seed) const |
getIndex using a very simple random generator More... | |
int | getInt () const |
Uniform int. More... | |
int | getInt (int min, int max) const |
random int in the range [min,max]> More... | |
template<class ODSET > | |
void | subselect (ODSET &ods, od_int64 targetsz) const |
template<class T > | |
void | subselect (T &, od_int64 targetsz) const |
template<class T , class SzTp > | |
void | subselect (T *, SzTp sz, SzTp targetsz) const |
Public Member Functions inherited from Stats::RandomGenerator | |
virtual | ~RandomGenerator () |
virtual void | init (int seed) |
Private Attributes | |
int | seed_ |
Uniform Random Generator.
<>
Stats::RandGen::RandGen | ( | ) |
|
virtual |
Uniform [0-1].
Implements Stats::RandomGenerator.
int Stats::RandGen::getIndex | ( | int | sz | ) | const |
random index in the range [0,sz>
od_int64 Stats::RandGen::getIndex | ( | od_int64 | sz | ) | const |
random index in the range [0,sz>
int Stats::RandGen::getIndexFast | ( | int | sz, |
int | seed | ||
) | const |
getIndex using a very simple random generator
od_int64 Stats::RandGen::getIndexFast | ( | od_int64 | sz, |
od_int64 | seed | ||
) | const |
getIndex using a very simple random generator
int Stats::RandGen::getInt | ( | ) | const |
Uniform int.
int Stats::RandGen::getInt | ( | int | min, |
int | max | ||
) | const |
random int in the range [min,max]>
|
inline |
void Stats::RandGen::subselect | ( | T & | , |
od_int64 | targetsz | ||
) | const |
Does not preserve order The removed items will really be erased
|
inline |
Does not preserve order. Afterwards, the 'removed' values occupy the indexes targetsz - maxsz-1
|
private |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022