big internal rework

This commit is contained in:
2024-02-29 14:48:36 +01:00
parent b9a5100cb0
commit d038ac5884
10 changed files with 224 additions and 193 deletions

View File

@@ -1,6 +1,7 @@
#include "Gauss.h"
#include "IO.h"
#include "Matrix.h"
#include "NR.h"
#include "Gauss.h"
#include "Solver.h"
#include <iostream>
@@ -19,8 +20,8 @@ void test() {
mat.Print();
// mat.Save("matrice4x4echelonne.mat"); */
Matrix mat2 {"matrice4x4.mat"};
mat2.Print();
Matrix mat2 = LoadMatrix("matrice4x4.mat");
Print(mat2);
Solver solver {mat2};
@@ -28,35 +29,27 @@ void test() {
Vect noyau = solver.Kernel();
std::cout << "\tImage :\n";
image.Print();
Print(image);
std::cout << "Système :\n";
image.GetLinearSystem().Print();
Print(image.GetLinearSystem());
std::cout << "\tNoyau :\n";
noyau.Print();
Print(noyau);
std::cout << "Système :\n";
noyau.GetLinearSystem().Print();
Print(noyau.GetLinearSystem());
std::cout << "\n\n";
solver.TriangularSystem().Print();
Print(solver.TriangularSystem());
}
void prompt() {
std::cout << "Quelle est le nombre de lignes de votre matrice ?" << std::endl;
std::size_t lignes;
std::cin >> lignes;
std::cout << "Quelle est le nombre de colonnes de votre matrice ?" << std::endl;
std::size_t colonnes;
std::cin >> colonnes;
std::cout << "Rentrez les coefficients de la matrice" << std::endl;
Matrix mat(lignes, colonnes);
mat.Insert();
Matrix mat = InsertMatrix();
mat.Print();
Print(mat);
Gauss::GaussJordan(mat, true, true);
mat.Print();
Print(mat);
}
int main(int argc, char** argv) {