Table of Contents

Struct RNG_MT19937

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Mersenne Twister random number generator

[SuppressMessage("Microsoft.Design", "CA1815: Override equals and operator equals on value types")]
public struct RNG_MT19937
Inherited Members

Remarks

operations.hpp

Constructors

RNG_MT19937(uint)

Constructor

Methods

Next()

updates the state and returns the next 32-bit unsigned integer random number

Run()
Run(uint)

returns a random integer sampled uniformly from [0, N).

Seed(uint)
ToDouble()
ToInt32()
ToSingle()
ToUInt32()
Uniform(double, double)

returns uniformly distributed double-precision floating-point random number from [a,b) range

Uniform(int, int)

returns uniformly distributed integer random number from [a,b) range

Uniform(float, float)

returns uniformly distributed floating-point random number from [a,b) range

Operators

explicit operator double(RNG_MT19937)
explicit operator int(RNG_MT19937)
explicit operator float(RNG_MT19937)
explicit operator uint(RNG_MT19937)