|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1536 (0x600)
Types: TextFile
Names: »extsvdecomp«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt.
└─⟦0364f57e3⟧
└─⟦58ca399f1⟧ »extbib«
└─⟦this⟧
svdecomp=algol list.yes index.no
external
real procedure svdecomp(a,v,sigma,pm,m,n,n1);
value m,n; integer m,n,n1; array a,v,sigma,pm;
begin
integer i,j,k,n2; real r,gram; array w(1:n);
gram:= 1; n1:= 1; n2:= n+1;
for i:=1 step 1 until n do for j:=i step -1 until 1 do begin
r:= sum(a(k,i)*a(k,j),k,1,m);
if i=j then begin
v(i,n2):= r:= sqrt(r); w(i):= 1/r; v(i,i):= 1
end else v(i,j):= r*w(i)*w(j)
end;
tridql(n,sigma,v);
for i:=1 step 1 until n do
if sigma(i)<=0 then n1:= n1+1
else begin
gram:= gram*sigma(i); sigma(i):= 1/sqrt(sigma(i));
end;
svdecomp:= gram;
comment The first n1-1 of the uncorrelated parameters are
undetermined by the equation. They are assumed
zero and only the columns n1 to n of u are formed in a;
for k:=1 step 1 until m do begin
for i:=1 step 1 until n do pm(i):= a(k,i)*w(i);
for i:=n1 step 1 until n do
a(k,i):= sum(pm(j)*v(i,j),j,1,n)*sigma(i);
end k;
for i:=n1 step 1 until n do
w(i):= sum(a(k,i)*a(k,n2),k,1,m)*sigma(i);
for i:=1 step 1 until n do
pm(i):= sum(v(j,i)*w(j),j,n1,n)/v(i,n2);
end; end
▶EOF◀