-/** Determinant of purely numeric matrix, using pivoting.
- *
- * @see matrix::determinant() */
-ex matrix::determinant_numeric(void) const
-{
- matrix tmp(*this);
- ex det = _ex1();
- ex piv;
-
- // standard Gauss method:
- for (unsigned r1=0; r1<row; ++r1) {
- int indx = tmp.pivot(r1);
- if (indx == -1)
- return _ex0();
- if (indx != 0)
- det *= _ex_1();
- det = det * tmp.m[r1*col+r1];
- for (unsigned r2=r1+1; r2<row; ++r2) {
- piv = tmp.m[r2*col+r1] / tmp.m[r1*col+r1];
- for (unsigned c=r1+1; c<col; c++) {
- tmp.m[r2*col+c] -= piv * tmp.m[r1*col+c];
- }
- }
- }
-
- return det;
-}
-
-