NMath Reference Guide

## Rand |

Class RandGenTriangular generates random numbers from a triangular distribution.

Inheritance Hierarchy

Syntax

The RandGenTriangular type exposes the following members.

Constructors

Name | Description | |
---|---|---|

RandGenTriangular | Constructs a random number generator using a RandGenMTwist as the underlying uniform random number generator. The lower bound of the deviates is -1, the upper bound is 1, and the mode is 0. | |

RandGenTriangular(Int32) | Constructs a random number generator using a seeded RandGenMTwist as the underlying uniform random number generator. The lower bound of the deviates is -1, the upper bound is 1, and the mode is 0. | |

RandGenTriangular(RandomNumberGeneratorUniformRandomNumber) | Constructs a random number generator using the given delegate as the underlying uniform random number generator. The lower bound of the deviates is -1, the upper bound is 1, and the mode is 0. | |

RandGenTriangular(Double, Double, Double) | Constructs a random number generator using a RandGenMTwist as the underlying uniform random number generator. The generated deviates will follow a triangular distribution with the specified lower bound, upper bound, and mode. | |

RandGenTriangular(Double, Double, Double, RandomNumberGeneratorUniformRandomNumber) | Constructs a random number generator using the given delegate as the underlying uniform random number generator. The generated deviates will follow a triangular distribution with the specified lower bound, upper bound, and mode. | |

RandGenTriangular(Double, Double, Double, Int32) | Constructs a random number generator using a seeded RandGenMTwist as the underlying uniform random number generator. The generated deviates will follow a triangular distribution with the specified lower bound, upper bound, and mode. |

Properties

Name | Description | |
---|---|---|

LowerBound | Gets the lower bound for the distribution. | |

Mode | Gets the mode for the distribution. | |

UniformDeviateMethod |
Gets and sets the delegate method for generating uniform deviates between
zero and one.
(Inherited from RandomNumberGenerator) | |

UpperBound | Gets the upper bound for the distribution. |

Methods

Name | Description | |
---|---|---|

Clone |
Creates a deep copy of this random number generator.
(Overrides RandomNumberGeneratorClone) | |

Fill(Double) |
Fills the given array of doubles with random values.
(Overrides RandomNumberGeneratorFill(Double)) | |

Fill(DoubleComplex) |
Fills the given array of double-precision complex numbers with random values.
(Overrides RandomNumberGeneratorFill(DoubleComplex)) | |

Fill(DoubleDataBlock) |
Fills the given data block with random values.
(Inherited from RandomNumberGenerator) | |

Fill(FloatComplex) |
Fills the given array of single-precision complex numbers with random values.
(Inherited from RandomNumberGenerator) | |

Fill(Single) |
Fills the given array of floats with random values.
(Inherited from RandomNumberGenerator) | |

Next | Gets the next random deviate. | |

NextDouble |
Generates a double precision random number.
(Overrides RandomNumberGeneratorNextDouble) | |

NextDoubleComplex |
Method for generating a double precision complex number random deviate.
(Overrides RandomNumberGeneratorNextDoubleComplex) | |

NextFloat |
Method for generating a single precision random deviate.
(Inherited from RandomNumberGenerator) | |

NextFloatComplex |
Method for generating a single precision complex number random deviate.
(Inherited from RandomNumberGenerator) | |

Reset |
Resets the random number generator using a random seed.
(Inherited from RandomNumberGenerator) | |

Reset(Int32) |
Resets the random number generator with the specified seed.
(Inherited from RandomNumberGenerator) | |

SetParameters | Sets the lower bound, upper bound, and mode for the distribution. |

Fields

Name | Description | |
---|---|---|

rand_ |
A delegate method for generating uniform deviates between zero and one.
(Inherited from RandomNumberGenerator) |

See Also