Class CustomRandomNumberProvider
Custom random number provider.
Inheritance
System.Object
CustomRandomNumberProvider
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 CustomRandomNumberProvider : IRandomNumberProvider, IRandomIntegerProvider, IRandomDoubleProvider
Constructors
| Improve this Doc View SourceCustomRandomNumberProvider(Cdf, IRandomDoubleProvider)
Initializes a new instance of the CustomRandomNumberProvider class.
Declaration
public CustomRandomNumberProvider(Cdf cdf, IRandomDoubleProvider baseRandom)
Parameters
Type | Name | Description |
---|---|---|
Cdf | cdf | Cdf. |
IRandomDoubleProvider | baseRandom | Base random provider. |
Methods
| Improve this Doc View SourceNext()
Computes next random integer.
Declaration
public int Next()
Returns
Type | Description |
---|---|
System.Int32 | The random integer from custom distribution. |
NextDouble()
Computes next random double.
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. |