Mercurial > hg > octave-nkf
changeset 5877:50d43cdbec80
[project @ 2006-07-01 21:52:05 by dbateman]
author | dbateman |
---|---|
date | Sat, 01 Jul 2006 21:52:06 +0000 |
parents | 565d0cd4d9d0 |
children | 27771d9cd4f4 |
files | liboctave/CSparse.cc liboctave/dSparse.cc |
diffstat | 2 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CSparse.cc +++ b/liboctave/CSparse.cc @@ -782,9 +782,9 @@ if (typ == MatrixType::Upper) colUp = cidx(j+1) - 1; else - colUp = cidx(j) - 1; + colUp = cidx(j); Complex pivot = data(colUp); - if (pivot == 0. || colUp != j) + if (pivot == 0. || ridx(colUp) != j) { (*current_liboctave_error_handler) ("division by zero"); @@ -810,9 +810,9 @@ if (typ == MatrixType::Upper) colUp = cidx(i+1) - 1; else - colUp = cidx(i) - 1; + colUp = cidx(i); Complex pivot = data(colUp); - if (pivot == 0. || colUp != i) + if (pivot == 0. || ridx(colUp) != i) { (*current_liboctave_error_handler) ("division by zero"); goto inverse_singular; @@ -878,7 +878,7 @@ if (typ == MatrixType::Permuted_Upper) pivot = data(cidx(jidx+1) - 1); else - pivot = data(cidx(jidx) - 1); + pivot = data(cidx(jidx)); if (pivot == 0.) { (*current_liboctave_error_handler) @@ -894,7 +894,7 @@ if (typ == MatrixType::Permuted_Upper) colUp = cidx(perm[iidx]+1) - 1; else - colUp = cidx(perm[iidx]) - 1; + colUp = cidx(perm[iidx]); Complex pivot = data(colUp); if (pivot == 0.)
--- a/liboctave/dSparse.cc +++ b/liboctave/dSparse.cc @@ -858,9 +858,9 @@ if (typ == MatrixType::Upper) colUp = cidx(j+1) - 1; else - colUp = cidx(j) - 1; + colUp = cidx(j); double pivot = data(colUp); - if (pivot == 0. || colUp != j) + if (pivot == 0. || ridx(colUp) != j) { (*current_liboctave_error_handler) ("division by zero"); @@ -886,9 +886,9 @@ if (typ == MatrixType::Upper) colUp = cidx(i+1) - 1; else - colUp = cidx(i) - 1; + colUp = cidx(i); double pivot = data(colUp); - if (pivot == 0. || colUp != i) + if (pivot == 0. || ridx(colUp) != i) { (*current_liboctave_error_handler) ("division by zero"); goto inverse_singular; @@ -954,7 +954,7 @@ if (typ == MatrixType::Permuted_Upper) pivot = data(cidx(jidx+1) - 1); else - pivot = data(cidx(jidx) - 1); + pivot = data(cidx(jidx)); if (pivot == 0.) { (*current_liboctave_error_handler) @@ -970,7 +970,7 @@ if (typ == MatrixType::Permuted_Upper) colUp = cidx(perm[iidx]+1) - 1; else - colUp = cidx(perm[iidx]) - 1; + colUp = cidx(perm[iidx]); double pivot = data(colUp); if (pivot == 0.)