ISmParetoDistribution.A

Syntax

A: Double;

Description

The A property determines the distribution parameter a.

Comments

The value must be greater than zero.

Example

Executing the example requires a form with the ChartBox and UiChart components, the UiChart component is a data source for ChartBox.

Class OBJ18689Form: Form
    ChartBox1: ChartBox;
    UiChart1: UiChart;
    Pareto: SmParetoDistribution;
    Values: Array Of Double;
    Const Cnt = 10;
    
    Sub OBJ18689FormOnCreate(Sender: Object; Args: IEventArgs);
    Begin
        Pareto := New SmParetoDistribution.Create;
        Text := Pareto.DisplayName;
        Pareto.A := 0.1;
        Pareto.B := 0.8;
        Values := Pareto.RandomVector(Cnt);
        UiChart1.PointCount := cnt;
       UiChart1.SerieCount := 1;
        UiChart1.Type := ChartType.Lines;
    End Sub OBJ18689FormOnCreate;
    
    Sub UiChart1OnGetDataValue(Sender: Object; Args: IUiChartGetDataValueEventArgs);
    Begin
        If Args.PointIndex < Cnt Then
            Args.Value := Values[Args.PointIndex];
            Args.Result := True;
        End If;
    End Sub UiChart1OnGetDataValue;
End Class OBJ18689Form;

Executing the example makes a Pareto distribution graph:

See also:

ISmParetoDistribution