Constructs a random number generator for a gamma distribution
using the specified distribution parameters.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public DoubleRandomGammaDistribution( double shape, double displacement, double scale, DoubleRandomGammaDistribution..::.GenerationMethod method ) |
| Visual Basic (Declaration) |
|---|
Public Sub New ( _ shape As Double, _ displacement As Double, _ scale As Double, _ method As DoubleRandomGammaDistribution..::.GenerationMethod _ ) |
| Visual C++ |
|---|
public: DoubleRandomGammaDistribution( double shape, double displacement, double scale, DoubleRandomGammaDistribution..::.GenerationMethod method ) |
Parameters
- shape
- Type: System..::.Double
Shape.
- displacement
- Type: System..::.Double
Displacement.
- scale
- Type: System..::.Double
Scale factor.
- method
- Type: CenterSpace.NMath.Core..::.DoubleRandomGammaDistribution..::.GenerationMethod
The generation method to use.
Remarks
If shape=1, the gamma distribution reduces to the exponential distribution.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if shape or scale factor is not greater than 0. |