C# Class OpenCvSharp.RNG

Random Number Generator. The class implements RNG using Multiply-with-Carry algorithm.
operations.hpp
Mostra file Open project: shimat/opencvsharp Class Usage Examples

Public Methods

Method Description
Fill ( OpenCvSharp.InputOutputArray mat, DistributionType distType, InputArray a, InputArray b, bool saturateRange = false ) : void

Gaussian ( double sigma ) : double

returns Gaussian random variate with mean zero.

Next ( ) : uint

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

RNG ( ) : System

RNG ( ulong state ) : System

Run ( ) : uint

Run ( uint n ) : uint

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

Uniform ( double a, double b ) : double

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

Uniform ( float a, float b ) : float

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

Uniform ( int a, int b ) : int

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

Method Details

Fill() public method

public Fill ( OpenCvSharp.InputOutputArray mat, DistributionType distType, InputArray a, InputArray b, bool saturateRange = false ) : void
mat OpenCvSharp.InputOutputArray
distType DistributionType
a InputArray
b InputArray
saturateRange bool
return void

Gaussian() public method

returns Gaussian random variate with mean zero.
public Gaussian ( double sigma ) : double
sigma double
return double

Next() public method

updates the state and returns the next 32-bit unsigned integer random number
public Next ( ) : uint
return uint

RNG() public method

public RNG ( ) : System
return System

RNG() public method

public RNG ( ulong state ) : System
state ulong
return System

Run() public method

public Run ( ) : uint
return uint

Run() public method

returns a random integer sampled uniformly from [0, N).
public Run ( uint n ) : uint
n uint
return uint

Uniform() public method

returns uniformly distributed double-precision floating-point random number from [a,b) range
public Uniform ( double a, double b ) : double
a double
b double
return double

Uniform() public method

returns uniformly distributed floating-point random number from [a,b) range
public Uniform ( float a, float b ) : float
a float
b float
return float

Uniform() public method

returns uniformly distributed integer random number from [a,b) range
public Uniform ( int a, int b ) : int
a int
b int
return int