nr take 2
All checks were successful
Linux arm64 / Build (push) Successful in 40s

This commit is contained in:
Pierre CHATAIGNER
2024-02-25 13:16:48 +01:00
19 changed files with 659 additions and 160 deletions

View File

@@ -1,9 +1,11 @@
#include "Matrix.h"
#include "NR.h"
#include "Gauss.h"
#include "Solver.h"
#include <iostream>
void test() {
Matrix mat{"matrice4x4.mat"};
/* Matrix mat{"matrice4x4.mat"};
mat.Print();
// mat.Save("matrice3x3.mat");
std::cout << "sdfdjiofoseifheoiefhoig\n";
@@ -15,7 +17,27 @@ void test() {
mat.Transpose();
std::cout << "<<\nTransposée:\n";
mat.Print();
// mat.Save("matrice4x4echelonne.mat");
// mat.Save("matrice4x4echelonne.mat"); */
Matrix mat2 {"matrice4x4.mat"};
mat2.Print();
Solver solver {mat2};
Vect image = solver.Image();
Vect noyau = solver.Kernel();
std::cout << "\tImage :\n";
image.Print();
std::cout << "Système :\n";
image.GetLinearSystem().Print();
std::cout << "\tNoyau :\n";
noyau.Print();
std::cout << "Système :\n";
noyau.GetLinearSystem().Print();
std::cout << "\n\n";
solver.TriangularSystem().Print();
}
void prompt() {
@@ -33,7 +55,7 @@ void prompt() {
mat.Print();
mat.GaussJordan(true);
Gauss::GaussJordan(mat, true, true);
mat.Print();
}