C# Class OpenCvSharp.RNG

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

Méthodes publiques

Méthode 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 méthode

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
Résultat void

Gaussian() public méthode

returns Gaussian random variate with mean zero.
public Gaussian ( double sigma ) : double
sigma double
Résultat double

Next() public méthode

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

RNG() public méthode

public RNG ( ) : System
Résultat System

RNG() public méthode

public RNG ( ulong state ) : System
state ulong
Résultat System

Run() public méthode

public Run ( ) : uint
Résultat uint

Run() public méthode

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

Uniform() public méthode

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

Uniform() public méthode

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

Uniform() public méthode

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