Class IntegerDistribution
Represents an integer parameter distribution.
public class IntegerDistribution : ParameterDistribution
- Inheritance
-
IntegerDistribution
- Inherited Members
Properties
DistributionType
Gets the type of distribution.
public override string DistributionType { get; }
Property Value
Max
Gets or sets the maximum value.
public int Max { get; set; }
Property Value
Min
Gets or sets the minimum value.
public int Min { get; set; }
Property Value
Step
Gets or sets the step size.
public int Step { get; set; }
Property Value
Methods
Sample(Random)
Samples a value from this distribution.
public override object Sample(Random random)
Parameters
randomRandom
Returns
Remarks
Samples an integer value from Min to Min + kStep where kStep does not exceed (Max - Min). Note: If (Max - Min) is not evenly divisible by Step, Max itself may not be sampled. For example, with Min=0, Max=10, Step=3, possible values are 0, 3, 6, 9 (not 10). To ensure Max is included, choose Step such that (Max - Min) % Step == 0.