MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The CryptoRandom is a random number generator that can use either the standard .Net Random objec or the more precise RandomNumberGenerator defined within the System.Security.Cryptograph. More...
Public Types | |
enum | METHOD { SYSTEM , CRYPTO , UNIFORM_EXACT , DEFAULT = CRYPTO } |
Defines the random number generation method to use. More... | |
Public Member Functions | |
CryptoRandom (METHOD method=METHOD.DEFAULT, int nSeed=0) | |
The CryptoRandom constructor. More... | |
double | NextDouble () |
Returns a random double within the range . More... | |
double | NextDouble (double dfMin, double dfMax) |
Returns a random double within the range More... | |
int | Next (int nMinVal, int nMaxVal, bool bMaxInclusive=true) |
Returns a random int within the range More... | |
int | Next () |
Returns a random int within the range More... | |
int | Next (int nMaxVal) |
Returns a random int within the range , where the random number is less than nMaxVal. More... | |
The CryptoRandom is a random number generator that can use either the standard .Net Random objec or the more precise RandomNumberGenerator defined within the System.Security.Cryptograph.
Definition at line 13 of file CryptoRandom.cs.
Defines the random number generation method to use.
Definition at line 24 of file CryptoRandom.cs.
MyCaffe.basecode.CryptoRandom.CryptoRandom | ( | METHOD | method = METHOD.DEFAULT , |
int | nSeed = 0 |
||
) |
The CryptoRandom constructor.
method | Specifies the random number generation method (default = CRYPTO1). |
nSeed | Specifies the seed used to initialize the random number generator, only used when bUseCrypto = false (default = 0, which is ignored). |
Definition at line 52 of file CryptoRandom.cs.
int MyCaffe.basecode.CryptoRandom.Next | ( | ) |
Returns a random int within the range
Definition at line 130 of file CryptoRandom.cs.
int MyCaffe.basecode.CryptoRandom.Next | ( | int | nMaxVal | ) |
Returns a random int within the range , where the random number is less than nMaxVal.
nMaxVal | Specifies the non-inclusive maximum of the range. |
Definition at line 140 of file CryptoRandom.cs.
int MyCaffe.basecode.CryptoRandom.Next | ( | int | nMinVal, |
int | nMaxVal, | ||
bool | bMaxInclusive = true |
||
) |
Returns a random int within the range
nMinVal | Specifies the range minimum. |
nMaxVal | Specifies the range maximum. |
bMaxInclusive | Optionally, specifies whether or not the Maximum is to be included in the selection. |
Definition at line 113 of file CryptoRandom.cs.
double MyCaffe.basecode.CryptoRandom.NextDouble | ( | ) |
Returns a random double within the range .
Definition at line 83 of file CryptoRandom.cs.
double MyCaffe.basecode.CryptoRandom.NextDouble | ( | double | dfMin, |
double | dfMax | ||
) |
Returns a random double within the range
dfMin | Specifies the range minimum. |
dfMax | Specifies the range maximum. |
Definition at line 101 of file CryptoRandom.cs.