mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 22:02:40 +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:
|
||||
begin
|
||||
FitSeries.ParamCount := 4;
|
||||
FitSeries.SetFitParamBasisFunc(0, @FitBaseFunc_Const, '');
|
||||
FitSeries.SetFitParamBasisFunc(1, @HarmonicBaseFunc, 'sin(x)');
|
||||
FitSeries.SetFitParamBasisFunc(2, @HarmonicBaseFunc, 'sin(3 x)');
|
||||
FitSeries.SetFitParamBasisFunc(3, @HarmonicBaseFunc, 'sin(5 x)');
|
||||
FitSeries.SetFitBasisFunc(1, @HarmonicBaseFunc, 'sin(x)');
|
||||
FitSeries.SetFitBasisFunc(2, @HarmonicBaseFunc, 'sin(3 x)');
|
||||
FitSeries.SetFitBasisFunc(3, @HarmonicBaseFunc, 'sin(5 x)');
|
||||
cbFitParam0Fixed.Caption := 'b0 = ';
|
||||
cbFitParam1Fixed.Caption := 'b1 = ';
|
||||
edFitParam0.Value := HARMONIC_PARAMS[0];
|
||||
|
@ -282,7 +282,9 @@ type
|
||||
TCalcGoodnessOfFitEvent = procedure (Sender: TObject; var x,y: ArbFloat;
|
||||
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)
|
||||
strict private
|
||||
@ -352,7 +354,8 @@ type
|
||||
function GetNearestPoint(
|
||||
const AParams: TNearestPointParams;
|
||||
out AResults: TNearestPointResults): Boolean; override;
|
||||
procedure SetFitParamBasisFunc(AIndex: Integer; AFitFunc: TFitFunc; AFitFuncName: String);
|
||||
procedure SetFitBasisFunc(AIndex: TFitFuncIndex; AFitFunc: TFitFunc;
|
||||
AFitFuncName: String);
|
||||
public // properties
|
||||
property Param[AIndex: Integer]: Double read GetParam;
|
||||
property ParamError[AIndex: Integer]: Double read GetParamError;
|
||||
@ -1996,7 +1999,7 @@ begin
|
||||
UpdateParentChart;
|
||||
end;
|
||||
|
||||
procedure TFitSeries.SetFitParamBasisFunc(AIndex: Integer; AFitFunc: TFitFunc;
|
||||
procedure TFitSeries.SetFitBasisFunc(AIndex: TFitFuncIndex; AFitFunc: TFitFunc;
|
||||
AFitFuncName: String);
|
||||
begin
|
||||
FFitParams[AIndex].Func := AFitFunc;
|
||||
|
Loading…
Reference in New Issue
Block a user