summaryrefslogtreecommitdiff
path: root/optimierung.inc
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-12-17 14:01:39 +0100
committerErich Eckner <git@eckner.net>2018-12-17 14:01:39 +0100
commitab79eab86cf5fd4846238ac1d83afc2fcdd9dc9f (patch)
tree3ee6515e593e4577577c84278021b6994bdcc676 /optimierung.inc
parent52901e961b1adf03a3b632c9a966435a2ef96284 (diff)
downloadunits-ab79eab86cf5fd4846238ac1d83afc2fcdd9dc9f.tar.xz
optimierung neu
Diffstat (limited to 'optimierung.inc')
-rw-r--r--optimierung.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/optimierung.inc b/optimierung.inc
new file mode 100644
index 0000000..80a5cb2
--- /dev/null
+++ b/optimierung.inc
@@ -0,0 +1,22 @@
+{$IFDEF tGausz2dFitParameterBuffer.initSamples}
+//procedure tGausz2dFitParameterBuffer.initSamples(qu: tExtendedArray; xSteps,tSiz,zoom: longint);
+var
+ x,y: longint;
+begin
+ sXSteps:=xSteps div zoom;
+ sTSiz:=tSiz div zoom;
+ setLength(samples,sXSteps*sTSiz);
+ for x:=0 to sXSteps-1 do
+ for y:=0 to sTSiz-1 do
+ samples[x+y*sXSteps]:=0;
+ for x:=0 to xSteps-1 do
+ for y:=0 to tSiz-1 do
+ samples[round(x/(xSteps-1)*(sXSteps-1)) + round(y/(tSiz-1)*(sTSiz-1))*sTSiz]:=
+ samples[round(x/(xSteps-1)*(sXSteps-1)) + round(y/(tSiz-1)*(sTSiz-1))*sTSiz] +
+ qu[x + y*xSteps];
+ for x:=0 to sXSteps-1 do
+ for y:=0 to sTSiz-1 do
+ samples[x+y*sXSteps]:=
+ samples[x+y*sXSteps] / xSteps * sXSteps / tSiz * sTSiz;
+end;
+{$ENDIF}