| IGLib 1.5 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | List of all members
IG.Num.IRandomGenerator Interface Reference

Uniform random number generator. More...

Inheritance diagram for IG.Num.IRandomGenerator:
[legend]

## Public Member Functions
double | NextDouble ()
| A double-precision floating point number greater than or equal to 0.0, and LESS THAN 1.0. More...
double | NextDouble (double maxValue)
| A double-precision floating point number greater than or equal to 0.0, and LESS than the specified maximum. More...
double | NextDouble (double minValue, double maxValue)
| A double-precision floating point number greater than or equal to the specified minimum, and LESS than the specified maximum. More...
double | NextDoubleInclusive ()
| A double-precision floating point number greater than or equal to 0.0, and LESS OR EQUAL than 1.0. More...
double | NextDoubleInclusive (double maxvalue)
| A double-precision floating point number greater than or equal to 0.0, and LESS OR EQUAL than the specified maximum. More...
double | NextDoubleInclusive (double minValue, double maxValue)
| A double-precision floating point number greater than or equal to the specified minimum, and LESS OR EQUAL than the specified maximum. More...
int | Next ()
| Returns a nonnegative random number. More...
int | Next (int maxValue)
| Returns a nonnegative random number LESS THAN the specified maximum. More...
int | Next (int minValue, int maxValue)
| Returns a random number within a specified range (lower bound inclusive, UPPER BOUND EXCLUSIVE). More...
int | NextInclusive (int maxValue)
| Returns a nonnegative random number LESS OR EQUAL THAN the specified maximum. More...
int | NextInclusive (int minValue, int maxValue)
| Returns a random number within a specified range (lower bound inclusive, upper bound INCLUSIVE). More...
void | NextBytes (byte[] buffer)
| Fills the elements of a specified array of bytes with random numbers. More...

## Detailed Description

Uniform random number generator.

## Member Function Documentation

double IG.Num.IRandomGenerator.NextDouble | ( |  | ) |

A double-precision floating point number greater than or equal to 0.0, and LESS THAN 1.0.

Returns
  A double-precision floating point number greater than or equal to 0.0, and less than 1.0.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

Referenced by IG.Num.SampledDataSet.CreateExampleLinear(), IG.Num.SampledDataSet.CreateExampleQuadratic(), IG.Gr3d.VtkPlotBase.ExampleSurfacePlot(), IG.Lib.StringTable.ExampleWriteCsv(), IG.Num.InputOutputElementDefinition.GetDistortedBounds(), IG.Num.VectorBase.SetRandom(), IG.Num.MatrixBase.SetRandomAntiSymmetric(), IG.Num.MatrixBase.SetRandomLowerTriangular(), IG.Num.MatrixBase.SetRandomSymmetric(), IG.Num.MatrixBase.SetRandomUpperTriangular(), and IG.Num.ScalarFunctionUntransformedBase.TestSpeed().

double IG.Num.IRandomGenerator.NextDouble | ( | double | maxValue | ) |

A double-precision floating point number greater than or equal to 0.0, and LESS than the specified maximum.

Returns
  A double-precision floating point number greater than or equal to 0.0, and LESS THAN THE SPECIFIED MAXIMUM.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

double IG.Num.IRandomGenerator.NextDouble | ( | double | minValue,
|  | double | maxValue
| ) |  |

A double-precision floating point number greater than or equal to the specified minimum, and LESS than the specified maximum.

Returns
  A double-precision floating point number greater than or equal to the specified minimum, and LESS than the specified maximum.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

double IG.Num.IRandomGenerator.NextDoubleInclusive | ( |  | ) |

A double-precision floating point number greater than or equal to 0.0, and LESS OR EQUAL than 1.0.

Returns
  A double-precision floating point number greater than or equal to 0.0, and less than 1.0.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

Referenced by IG.Num.BoundingBoxBase.GetRandomPoint(), IG.Num.M.rand(), and IG.Num.MExt.Rand().

double IG.Num.IRandomGenerator.NextDoubleInclusive | ( | double | maxvalue | ) |

A double-precision floating point number greater than or equal to 0.0, and LESS OR EQUAL than the specified maximum.

Returns
  A double-precision floating point number greater than or equal to 0.0, and LESS OR EQUAL THAN THE SPECIFIED MAXIMUM.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

double IG.Num.IRandomGenerator.NextDoubleInclusive | ( | double | minValue,
|  | double | maxValue
| ) |  |

A double-precision floating point number greater than or equal to the specified minimum, and LESS OR EQUAL than the specified maximum.

Returns
  A double-precision floating point number greater than or equal to the specified minimum, and LESS OR EQUAL than the specified maximum.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

int IG.Num.IRandomGenerator.Next | ( |  | ) |

Returns a nonnegative random number.

Returns
  A 32-bit signed integer greater than or equal to zero and less than MaxValue.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

int IG.Num.IRandomGenerator.Next | ( | int | maxValue | ) |

Returns a nonnegative random number LESS THAN the specified maximum.

Parameters

  maxValue | The EXCLUSIVE upper bound of the random number to be generated. Must be greater than or equal to zero.

Returns
  A 32-bit signed integer greater than or equal to zero, and LESS THAN maxValue. If maxValue equals zero, maxValue is returned.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

int IG.Num.IRandomGenerator.Next | ( | int | minValue,
|  | int | maxValue
| ) |  |

Returns a random number within a specified range (lower bound inclusive, UPPER BOUND EXCLUSIVE).

Parameters

  minValue | The inclusive lower bound of the random number returned.
  maxValue | The EXCLUSIVE UPPER BOUND of the random number returned. Must be greater than or equal to minValue.

Returns
  A 32-bit signed integer greater than or equal to minValue and less than maxValue. If minValue equals maxValue, minValue is returned.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

int IG.Num.IRandomGenerator.NextInclusive | ( | int | maxValue | ) |

Returns a nonnegative random number LESS OR EQUAL THAN the specified maximum.

Parameters

  maxValue | The INCLUSIVE upper bound of the random number to be generated. Must be greater than or equal to zero.

Returns
  A 32-bit signed integer greater than or equal to zero, and LESS OR EQUAL than maxValue. If maxValue equals zero, maxValue is returned.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

Referenced by IG.Lib.IndexList.SetRandom().

int IG.Num.IRandomGenerator.NextInclusive | ( | int | minValue,
|  | int | maxValue
| ) |  |

Returns a random number within a specified range (lower bound inclusive, upper bound INCLUSIVE).

Parameters

  minValue | he inclusive lower bound of the random number returned.
  maxValue | The INCLUSIVE upper bound of the random number returned. Must be greater than or equal to minValue.

Returns
  A 32-bit signed integer greater than or equal to minValue and LESS OR EQUAL than maxValue. If minValue equals maxValue, minValue is returned.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

void IG.Num.IRandomGenerator.NextBytes | ( | byte[] | buffer | ) |

Fills the elements of a specified array of bytes with random numbers.

Parameters

  buffer | An array of bytes to contain random numbers.

Implemented in IG.Num.RandomGeneratorSystem, and IG.Num.RandGeneratorThreadSafe.

The documentation for this interface was generated from the following file:

- igbase/numeric/Random.cs