pcshft.pas
来自「Delphi Pascal 数据挖掘领域算法包 数值算法大全」· PAS 代码 · 共 21 行
PAS
21 行
PROCEDURE pcshft(a,b: real; VAR d: glcarray; n: integer);
(* Programs using routine PCSHFT must define the type
glcarray as in routine CHEBFT. *)
VAR
k,j: integer;
fac,cnst: real;
BEGIN
cnst := 2.0/(b-a);
fac := cnst;
FOR j := 2 TO n DO BEGIN
d[j] := d[j]*fac;
fac := fac*cnst
END;
cnst := 0.5*(a+b);
FOR j := 1 TO n-1 DO BEGIN
FOR k := n-1 DOWNTO j DO BEGIN
d[k] := d[k]-cnst*d[k+1]
END
END
END;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?