16
ex, nex, nel, ind, p, q, r, s, n, i, j, b, term: ArbInt;
17
a: array[n1..n2] of ArbFloat;
18
lam: array[i1..i2] of ArbFloat;
19
x, mat, e: array[i1..i2, i1..i2] of ArbFloat;
21
Write(' program results eigbs3te');
22
case sizeof(ArbFloat) of
23
4: writeln('(single)');
25
8: writeln('(double)');
29
writeln('number of examples', nex: 2);
33
writeln('example number', ex: 2);
35
Read(p, q, r, s, n, b);
36
nel := n * (b + 1) - (b * (b + 1)) div 2;
37
iomrev(input, a[p], nel);
38
eigbs3(a[p], n, b, lam[q], x[r, s], rwx, term);
40
iomwrv(output, a[p], nel, numdig);
42
writeln('term=', term: 2);
47
iomwrv(output, lam[q], n, numdig);
50
iomwrm(output, x[r, s], n, n, rwx, numdig);
55
mat[i + r - 1, j + s - 1] := 0
58
mat[i + r - 1, j + s - 1] := a[ind];
62
for j := i + 1 to n do
63
mat[i + r - 1, j + s - 1] := mat[j + r - 1, i + s - 1];
65
writeln(' matrix A =');
66
iomwrm(output, mat[r, s], n, n, rwx, numdig);
68
writeln('Ax-lambda.x = ');
69
omvmmm(mat[r, s], n, n, rwx, x[r, s], n, rwx, e[r, s], rwx);
72
e[i + r - 1, j + s - 1] := e[i + r - 1, j + s - 1] - lam[q + j - 1] * x[i + r - 1, j + s - 1];
73
iomwrm(output, e[r, s], n, n, rwx, numdig);
76
writeln('-------------------------------------------');
96
ex, nex, nel, ind, p, q, r, s, n, i, j, b, term: ArbInt;
97
a: array[n1..n2] of ArbFloat;
98
lam: array[i1..i2] of ArbFloat;
99
x, mat, e: array[i1..i2, i1..i2] of ArbFloat;
101
Write(' program results eigbs3te');
102
case sizeof(ArbFloat) of
103
4: writeln('(single)');
104
6: writeln('(real)');
105
8: writeln('(double)');
109
writeln('number of examples', nex: 2);
111
for ex := 1 to nex do
113
writeln('example number', ex: 2);
115
Read(p, q, r, s, n, b);
116
nel := n * (b + 1) - (b * (b + 1)) div 2;
117
iomrev(input, a[p], nel);
118
eigbs3(a[p], n, b, lam[q], x[r, s], rwx, term);
120
iomwrv(output, a[p], nel, numdig);
122
writeln('term=', term: 2);
127
iomwrv(output, lam[q], n, numdig);
130
iomwrm(output, x[r, s], n, n, rwx, numdig);
135
mat[i + r - 1, j + s - 1] := 0
138
mat[i + r - 1, j + s - 1] := a[ind];
142
for j := i + 1 to n do
143
mat[i + r - 1, j + s - 1] := mat[j + r - 1, i + s - 1];
145
writeln(' matrix A =');
146
iomwrm(output, mat[r, s], n, n, rwx, numdig);
148
writeln('Ax-lambda.x = ');
149
omvmmm(mat[r, s], n, n, rwx, x[r, s], n, rwx, e[r, s], rwx);
152
e[i + r - 1, j + s - 1] := e[i + r - 1, j + s - 1] - lam[q + j - 1] * x[i + r - 1, j + s - 1];
153
iomwrm(output, e[r, s], n, n, rwx, numdig);
156
writeln('-------------------------------------------');