Struct RNG_MT19937
Mersenne Twister random number generator
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: OpenCvSharp.dll
Syntax
public struct RNG_MT19937
Constructors
|
Improve this Doc
View Source
RNG_MT19937(UInt32)
Declaration
public RNG_MT19937(uint s = 5489U)
Parameters
Type |
Name |
Description |
System.UInt32 |
s |
|
Methods
|
Improve this Doc
View Source
Next()
updates the state and returns the next 32-bit unsigned integer random number
Declaration
Returns
Type |
Description |
System.UInt32 |
|
|
Improve this Doc
View Source
Run()
Declaration
Returns
Type |
Description |
System.UInt32 |
|
|
Improve this Doc
View Source
Run(UInt32)
returns a random integer sampled uniformly from [0, N).
Declaration
Parameters
Type |
Name |
Description |
System.UInt32 |
b |
|
Returns
Type |
Description |
System.UInt32 |
|
|
Improve this Doc
View Source
Seed(UInt32)
Declaration
Parameters
Type |
Name |
Description |
System.UInt32 |
s |
|
|
Improve this Doc
View Source
ToDouble()
Declaration
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
ToInt32()
Declaration
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
ToSingle()
Declaration
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
ToUInt32()
Declaration
Returns
Type |
Description |
System.UInt32 |
|
|
Improve this Doc
View Source
returns uniformly distributed double-precision floating-point random number from [a,b) range
Declaration
public double Uniform(double a, double b)
Parameters
Type |
Name |
Description |
System.Double |
a |
|
System.Double |
b |
|
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
returns uniformly distributed integer random number from [a,b) range
Declaration
public int Uniform(int a, int b)
Parameters
Type |
Name |
Description |
System.Int32 |
a |
|
System.Int32 |
b |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
returns uniformly distributed floating-point random number from [a,b) range
Declaration
public float Uniform(float a, float b)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
System.Single |
b |
|
Returns
Type |
Description |
System.Single |
|
Operators
|
Improve this Doc
View Source
Explicit(RNG_MT19937 to Double)
Declaration
public static explicit operator double (RNG_MT19937 self)
Parameters
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
Explicit(RNG_MT19937 to Int32)
Declaration
public static explicit operator int (RNG_MT19937 self)
Parameters
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Explicit(RNG_MT19937 to Single)
Declaration
public static explicit operator float (RNG_MT19937 self)
Parameters
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Explicit(RNG_MT19937 to UInt32)
Declaration
public static explicit operator uint (RNG_MT19937 self)
Parameters
Returns
Type |
Description |
System.UInt32 |
|