summaryrefslogtreecommitdiff
path: root/optimierung.inc
blob: 80a5cb2af850ca8846af71bfecf8f207c1c064c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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}