10 int solv(
double *a,
double *
b,
int n)
14 double *
ps, *p, *q, *pa, *pd;
16 double *q0, s,
t, tq = 0., zr = 1.e-15;
18 q0 = (
double *)calloc(n,
sizeof(
double));
19 for (j = 0, pa = a, pd = a; j < n; ++j, ++pa, pd += n + 1) {
21 for (i = 0, q = q0, p = pa; i < n; ++i, p += n)
23 for (i = 1; i < n; ++i) {
25 for (k = 0, p = pa + i * n - j, q = q0,
t = 0.; k < lc; ++k)
29 for (i = 0, q = q0, p = pa; i < n; ++i, p += n)
34 for (k = j + 1,
ps = pd; k < n; ++k) {
35 if ((
t = fabs(*(
ps += n))) > s) {
49 for (k = 0, p = a + n * j, q = a + n * lc; k < n; ++k) {
55 for (k = j + 1,
ps = pd,
t = 1. / *pd; k < n; ++k)
58 for (j = 1,
ps =
b + 1; j < n; ++j) {
59 for (k = 0, p = a + n * j, q =
b,
t = 0.; k < j; ++k)
63 for (j = n - 1, --
ps, pd = a + n * n - 1; j >= 0; --j, pd -= n + 1) {
64 for (k = j + 1, p = pd, q =
b + j,
t = 0.; k < n; ++k)
int solv(double *a, double *b, int n)