10 int svdval(
double *d,
double *a,
int m,
int n)
12 double *p, *p1, *q, *w, *v;
16 int i, j, k, mm, nm, ms;
20 w = (
double *)calloc(m,
sizeof(
double));
21 for (i = 0, mm = m, nm = n - 1, p = a; i < n; ++i, --mm, --nm, p += n + 1) {
23 for (j = 0, q = p, s = 0.; j < mm; ++j, q += n) {
34 for (k = 1, ms = n - i; k < ms; ++k) {
35 for (j = 0, q = p + k, u = 0.; j < mm; q += n)
38 for (j = 0, q = p + k; j < mm; q += n)
46 for (j = 0, q = p1, s = 0.; j < nm; ++j, ++q)
55 for (k = n, ms = n * (m - i); k < ms; k += n) {
56 for (j = 0, q = p1, v = p1 + k, u = 0.; j < nm; ++j)
59 for (j = 0, q = p1, v = p1 + k; j < nm; ++j)
67 for (j = 0, p = a; j < n; ++j, p += n + 1) {
75 for (i = 0; i < n; ++i)
int svdval(double *d, double *a, int m, int n)
int qrbdi(double *d, double *e, int n)