A: Double;
The A property determines the distribution parameter a.
The value must be greater than zero.
To execute the example, the form must have the ChartBox component and the UiChart component which serves as the 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;
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 this example makes a Pareto distribution graph:
See also: