Table of Contents

Class IntegerDistribution

Namespace
AiDotNet.Models
Assembly
AiDotNet.dll

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

string

Max

Gets or sets the maximum value.

public int Max { get; set; }

Property Value

int

Min

Gets or sets the minimum value.

public int Min { get; set; }

Property Value

int

Step

Gets or sets the step size.

public int Step { get; set; }

Property Value

int

Methods

Sample(Random)

Samples a value from this distribution.

public override object Sample(Random random)

Parameters

random Random

Returns

object

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.