MSCAN solution
[R] begin
ldpsum := A;
[north of R] ldpsum := 1.0;
[west of R] ldpsum := 1.0;
[nw of R] ldpsum := 1.0;
rdpsum := A;
[north of R] rdpsum := 1.0;
[east of R] rdpsum := 1.0;
[ne of R] rdpsum := 1.0;
scan
ldpsum *= ldpsum'@nw;
end;
scan
rdpsum *= rdpsum'@ne;
end;
for i := 1 to n-1 do
[n-i,n] temp := +<<ldpsum;
[n,i] ldpsum *= temp;
[i,1] temp := +<<rdpsum;
[n,i+1] rdpsum *= temp;
end;
[n, 1..n] return +<<ldpsum - +<<rdpsum; -- Return determinant
end;
Previous slide
Next slide
Back to first slide
View graphic version