Class DefaultRandomNumberProvider
Default random number provider.
Inheritance
System.Object
DefaultRandomNumberProvider
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SpiceSharpParser.Common.Mathematics.Probability
Assembly: SpiceSharpParser.dll
Syntax
public class DefaultRandomNumberProvider : IRandomNumberProvider, IRandomIntegerProvider, IRandomDoubleProvider
Constructors
| Improve this Doc View SourceDefaultRandomNumberProvider(Random)
Initializes a new instance of the DefaultRandomNumberProvider class.
Declaration
public DefaultRandomNumberProvider(Random random)
Parameters
Type | Name | Description |
---|---|---|
System.Random | random | Random instance. |
Methods
| Improve this Doc View SourceNext()
Computes next random integer with given maximum.
Declaration
public int Next()
Returns
Type | Description |
---|---|
System.Int32 | The random integer from custom distribution. |
NextDouble()
Computes the next random double in range (0,1) with custom distribution.
Declaration
public double NextDouble()
Returns
Type | Description |
---|---|
System.Double | The random double from custom distribution. |
NextSignedDouble()
Computes the next random double in range (-1,1) with custom distribution.
Declaration
public double NextSignedDouble()
Returns
Type | Description |
---|---|
System.Double | The random double from custom distribution. |