Lambda: Double;
The Lambda property determines event intensity value.
Event intensity is a positive real number, equal to the expected number of occurrences during the given interval.
To execute the example, the form must have the ChartBox component and the UiChart component which serves as the source for ChartBox.
Class OBJ18691Form: Form
ChartBox1: ChartBox;
UiChart1: UiChart;
Poisson: SmPoissonDistribution;
Values: Array Of Double;
Const Cnt = 100;
Sub OBJ18691FormOnCreate(Sender: Object; Args: IEventArgs);
Begin
Poisson := New SmPoissonDistribution.Create;
Text := Poisson.DisplayName;
Poisson.Lambda := 3.2;
Values := Poisson.RandomVector(Cnt);
UiChart1.PointCount := cnt;
End Sub OBJ18691FormOnCreate;
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 OBJ18691Form;
After executing the example a graph of Poisson distribution:
See also: