Show / Hide Table of Contents

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)
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public struct RNG_MT19937
Remarks

operations.hpp

Constructors

| Improve this Doc View Source

RNG_MT19937(UInt32)

Constructor

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
public uint Next()
Returns
Type Description
System.UInt32
| Improve this Doc View Source

Run()

Declaration
public uint Run()
Returns
Type Description
System.UInt32
| Improve this Doc View Source

Run(UInt32)

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

Declaration
public uint Run(uint b)
Parameters
Type Name Description
System.UInt32 b
Returns
Type Description
System.UInt32
| Improve this Doc View Source

Seed(UInt32)

Declaration
public void Seed(uint s)
Parameters
Type Name Description
System.UInt32 s
| Improve this Doc View Source

ToDouble()

Declaration
public double ToDouble()
Returns
Type Description
System.Double
| Improve this Doc View Source

ToInt32()

Declaration
public int ToInt32()
Returns
Type Description
System.Int32
| Improve this Doc View Source

ToSingle()

Declaration
public float ToSingle()
Returns
Type Description
System.Single
| Improve this Doc View Source

ToUInt32()

Declaration
public uint ToUInt32()
Returns
Type Description
System.UInt32
| Improve this Doc View Source

Uniform(Double, Double)

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

Uniform(Int32, Int32)

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

Uniform(Single, Single)

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
Type Name Description
RNG_MT19937 self
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
Type Name Description
RNG_MT19937 self
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
Type Name Description
RNG_MT19937 self
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
Type Name Description
RNG_MT19937 self
Returns
Type Description
System.UInt32
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX