scales[i] = 1.0 / biggest;
else {
scales[i] = 0.0;
- return (0); /* Zero row: singular matrix */
+ return 0; /* Zero row: singular matrix */
}
ps[i] = i; /* Initialize pivot sequence */
}
}
}
if (biggest <= 0.0)
- return (0); /* Zero column: singular matrix */
+ return 0; /* Zero column: singular matrix */
if (pivotindex != k) { /* Update pivot sequence */
j = ps[k];
ps[k] = ps[pivotindex];
}
if (lu[ps[n - 1]][n - 1] == 0.0)
- return (0); /* Singular matrix */
- return (1);
+ return 0; /* Singular matrix */
+ return 1;
}
/* lu_solve() solves the linear equation (Ax = b) after the matrix A has