mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 13:56:00 +02:00
TAChart: Rename TFuncSeries method SetFitParamBasisFunc to SetFitBasisFunc; restrict its parameter AIndex to be > 0.
git-svn-id: trunk@58770 -
This commit is contained in:
parent
5c2e3bcf94
commit
4907624f26
@ -227,10 +227,9 @@ begin
|
|||||||
feCustom:
|
feCustom:
|
||||||
begin
|
begin
|
||||||
FitSeries.ParamCount := 4;
|
FitSeries.ParamCount := 4;
|
||||||
FitSeries.SetFitParamBasisFunc(0, @FitBaseFunc_Const, '');
|
FitSeries.SetFitBasisFunc(1, @HarmonicBaseFunc, 'sin(x)');
|
||||||
FitSeries.SetFitParamBasisFunc(1, @HarmonicBaseFunc, 'sin(x)');
|
FitSeries.SetFitBasisFunc(2, @HarmonicBaseFunc, 'sin(3 x)');
|
||||||
FitSeries.SetFitParamBasisFunc(2, @HarmonicBaseFunc, 'sin(3 x)');
|
FitSeries.SetFitBasisFunc(3, @HarmonicBaseFunc, 'sin(5 x)');
|
||||||
FitSeries.SetFitParamBasisFunc(3, @HarmonicBaseFunc, 'sin(5 x)');
|
|
||||||
cbFitParam0Fixed.Caption := 'b0 = ';
|
cbFitParam0Fixed.Caption := 'b0 = ';
|
||||||
cbFitParam1Fixed.Caption := 'b1 = ';
|
cbFitParam1Fixed.Caption := 'b1 = ';
|
||||||
edFitParam0.Value := HARMONIC_PARAMS[0];
|
edFitParam0.Value := HARMONIC_PARAMS[0];
|
||||||
|
@ -282,7 +282,9 @@ type
|
|||||||
TCalcGoodnessOfFitEvent = procedure (Sender: TObject; var x,y: ArbFloat;
|
TCalcGoodnessOfFitEvent = procedure (Sender: TObject; var x,y: ArbFloat;
|
||||||
n: Integer; out AResult: Double) of object;
|
n: Integer; out AResult: Double) of object;
|
||||||
|
|
||||||
TFitFuncEvent = procedure(AIndex: Integer; AFitFunc: TFitFunc) of object;
|
TFitFuncIndex = 1..MaxInt;
|
||||||
|
|
||||||
|
TFitFuncEvent = procedure(AIndex: TFitFuncIndex; AFitFunc: TFitFunc) of object;
|
||||||
|
|
||||||
TFitSeries = class(TBasicPointSeries)
|
TFitSeries = class(TBasicPointSeries)
|
||||||
strict private
|
strict private
|
||||||
@ -352,7 +354,8 @@ type
|
|||||||
function GetNearestPoint(
|
function GetNearestPoint(
|
||||||
const AParams: TNearestPointParams;
|
const AParams: TNearestPointParams;
|
||||||
out AResults: TNearestPointResults): Boolean; override;
|
out AResults: TNearestPointResults): Boolean; override;
|
||||||
procedure SetFitParamBasisFunc(AIndex: Integer; AFitFunc: TFitFunc; AFitFuncName: String);
|
procedure SetFitBasisFunc(AIndex: TFitFuncIndex; AFitFunc: TFitFunc;
|
||||||
|
AFitFuncName: String);
|
||||||
public // properties
|
public // properties
|
||||||
property Param[AIndex: Integer]: Double read GetParam;
|
property Param[AIndex: Integer]: Double read GetParam;
|
||||||
property ParamError[AIndex: Integer]: Double read GetParamError;
|
property ParamError[AIndex: Integer]: Double read GetParamError;
|
||||||
@ -1996,7 +1999,7 @@ begin
|
|||||||
UpdateParentChart;
|
UpdateParentChart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFitSeries.SetFitParamBasisFunc(AIndex: Integer; AFitFunc: TFitFunc;
|
procedure TFitSeries.SetFitBasisFunc(AIndex: TFitFuncIndex; AFitFunc: TFitFunc;
|
||||||
AFitFuncName: String);
|
AFitFuncName: String);
|
||||||
begin
|
begin
|
||||||
FFitParams[AIndex].Func := AFitFunc;
|
FFitParams[AIndex].Func := AFitFunc;
|
||||||
|
Loading…
Reference in New Issue
Block a user