LazStats: Refactor DataProcs unit, in particular TAB, CSV and SSV import/export routines.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7475 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-05-26 22:45:40 +00:00
parent f635c93904
commit 070742ad3e
4 changed files with 679 additions and 554 deletions

View File

@ -132,15 +132,16 @@ const
1.585,1.575,1.566,1.557,1.548,1.541
);
var
i, j, GrpVar, MeasVar, mingrp, maxgrp, G, range, grpsize : integer;
oldgrpsize : integer;
X, UCL, LCL, UpperSpec, LowerSpec, TargetSpec : double;
xmin, xmax, GrandMean, GrandSD, semean, D3Value, D4Value : double;
GrandSigma, C4, gamma, B : double;
i, j, GrpVar, MeasVar, mingrp, maxgrp, G, range, grpsize: integer;
oldgrpsize: integer;
X, UCL, LCL, UpperSpec, LowerSpec, TargetSpec: double;
xmin, xmax, GrandMean, GrandSD, semean: double;
GrandSigma, C4, gamma, B: double;
D3Value, D4Value: Double;
means, stddev: DblDyneVec;
count : IntDyneVec;
count: IntDyneVec;
cellstring: string;
sizeerror : boolean;
sizeerror: boolean;
lReport: TStrings;
procedure CleanUp;
@ -234,14 +235,14 @@ begin
if oldgrpsize <> grpsize then sizeerror := true;
end;
if (grpsize < 2) or (grpsize > 25) or (sizeerror) then
if (grpsize < 2) or (grpsize > 25) or sizeError then
begin
MessageDlg('Group sizes error.', mtError, [mbOK], 0);
CleanUp;
exit;
end;
semean := semean - ((GrandMean * GrandMean) / NoCases);
semean := semean - sqr(GrandMean)/NoCases;
semean := semean / (NoCases - 1);
semean := sqrt(semean);
GrandSD := semean;

View File

@ -639,11 +639,11 @@ begin
x4 := x1 + triwidth;
yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin);
ydist := round(yprop * YAxisLength);
y1 := YStart - yoffset - round(ydist);
y1 := YStart - yoffset - ydist;
y2 := y1 - triheight;
yprop := (YPoints[i-1,j] - YMin) / (YMax - YMin);
ydist := round(yprop * YAxisLength);
y3 := ystart - yoffset {%H-}- round(ydist);
y3 := ystart - yoffset - ydist;
y4 := y3 - triheight;
points[0] := Point(x1,y1);
points[1] := Point(x2,y2);

File diff suppressed because it is too large Load Diff

View File

@ -97,6 +97,10 @@ const
TWO_PI = 2.0 * PI;
TAB_FILE_FILTER = 'Tab field files (*.tab)|*.tab;*.TAB|Text files (*.txt)|*.txt;*.TXT|All files (*.*)|*.*';
CSV_FILE_FILTER = 'Comma field files (*.csv)|*.csv;*.CSV|Text files (*.txt)|*.txt;*.TXT|All files (*.*)|*.*';
SSV_FILE_FILTER = 'Space field files (*.ssv)|*.ssv;*.SSV|Text files (*.txt)|*.txt;*.TXT|All files (*.*)|*.*';
implementation
end.