refactor project

This commit is contained in:
2024-02-23 10:48:43 +01:00
parent 82ad2e0696
commit 3b07ae783f
8 changed files with 103 additions and 119 deletions

View File

@@ -1,5 +1,6 @@
#include "Vect.h"
#include "Gauss.h"
#include "Solver.h"
#include <cassert>
#include <iostream>
@@ -45,7 +46,7 @@ bool Vect::operator==(const Vect& other) const {
void Vect::AddVector(const Matrix& mat) {
m_Data.Augmenter(mat);
m_Data.Transpose();
m_Data.GaussNonJordan(false);
Gauss::GaussJordan(m_Data, false, false);
m_Data.Transpose();
Simplify();
}
@@ -68,7 +69,7 @@ void Vect::Print() const {
std::cout << "Espace vectoriel de dimension " << GetCardinal() << " de base :\n\n";
for (std::size_t i = 0; i < m_Data.GetRawCount(); i++) {
for (std::size_t j = 0; j < m_Data.GetColumnCount(); j++) {
printf("[ %u ]\t", static_cast<float>(m_Data.at(i, j)));
printf("[ %d ]\t", static_cast<float>(m_Data.at(i, j)));
}
std::cout << "\n";
}