fix gauss
This commit is contained in:
@@ -147,7 +147,7 @@ void Matrix::GaussNonJordan(bool reduite) {
|
||||
// std::cout << "l'indice du maximum est : " << indice_ligne_maximum << "\n\n";
|
||||
|
||||
// Si A[k,j]≠0 alors (A[k,j] désigne la valeur de la ligne k et de la colonne j)
|
||||
if (at(indice_ligne_maximum, j) != 0) {
|
||||
if (!IsEqualZero(at(indice_ligne_maximum, j))) {
|
||||
r++;
|
||||
|
||||
// PrintDebug();
|
||||
@@ -179,10 +179,11 @@ void Matrix::GaussNonJordan(bool reduite) {
|
||||
}
|
||||
|
||||
void Matrix::GaussJordan(bool reduite) {
|
||||
GaussNonJordan(reduite);
|
||||
for (std::size_t i = 0; i < m_Lignes; i++) {
|
||||
int k = -1;
|
||||
for (std::size_t j = 0; j < m_Colonnes; j++) {
|
||||
if (at(i, j) != 0) {
|
||||
if (!IsEqualZero(at(i, j))) {
|
||||
k = j;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user