Click or drag to resize

RNG Structure

Random Number Generator. The class implements RNG using Multiply-with-Carry algorithm.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public struct RNG : IEquatable<RNG>

The RNG type exposes the following members.

Constructors
  NameDescription
Public methodRNG
Constructor
Top
Properties
  NameDescription
Public propertyState
Top
Methods
  NameDescription
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(RNG)
Indicates whether the current object is equal to another object of the same type.
Public methodFill
Fills arrays with random numbers.
Public methodGaussian
Returns the next random number sampled from the Gaussian distribution. The method transforms the state using the MWC algorithm and returns the next random number from the Gaussian distribution N(0,sigma) . That is, the mean value of the returned random numbers is zero and the standard deviation is the specified sigma.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodNext
updates the state and returns the next 32-bit unsigned integer random number
Public methodRun
Public methodRun(UInt32)
returns a random integer sampled uniformly from [0, N).
Public methodToByte
(byte)RNG.next()
Public methodToDouble
returns a next random value as double (System.Double)
Public methodToInt16
(short)RNG.next()
Public methodToInt32
(int)RNG.next()
Public methodToSByte
(sbyte)RNG.next()
Public methodToSingle
returns a next random value as float (System.Single)
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Public methodToUInt16
(ushort)RNG.next()
Public methodToUInt32
(uint)RNG.next()
Public methodUniform(Double, Double)
returns uniformly distributed double-precision floating-point random number from [a,b) range
Public methodUniform(Int32, Int32)
returns uniformly distributed integer random number from [a,b) range
Public methodUniform(Single, Single)
returns uniformly distributed floating-point random number from [a,b) range
Top
Operators
Remarks
operations.hpp
See Also