This repository has been archived on 2025-02-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Pivot/src/main.cpp
2024-05-04 14:56:50 +02:00

60 lines
1.1 KiB
C++

#include "Gauss.h"
#include "IO.h"
#include "Matrix.h"
#include "NR.h"
#include "Solver.h"
#include <iostream>
void test() {
/* Matrix mat{"matrice4x4.mat"};
mat.Print();
// mat.Save("matrice3x3.mat");
std::cout << "sdfdjiofoseifheoiefhoig\n";
mat.Print();
//mat = {"matrice4x4.mat"};
mat.GaussJordan(false);
std::cout << "\nResultat :\n";
mat.Print();
mat.Transpose();
std::cout << "<<\nTransposée:\n";
mat.Print();
// mat.Save("matrice4x4echelonne.mat"); */
Matrix mat2 = LoadMatrix("matrice4x4.mat");
Print(mat2);
Solver solver;
Vect image = solver.Image(Matrix{mat2});
Vect noyau = solver.Kernel(Matrix{mat2});
std::cout << "\tImage :\n";
Print(image);
std::cout << "Système :\n";
Print(image.GetLinearSystem());
std::cout << "\tNoyau :\n";
Print(noyau);
std::cout << "Système :\n";
Print(noyau.GetLinearSystem());
std::cout << "\n\n";
// Print(solver.TriangularSystem(mat2));
}
void prompt() {
Matrix mat = InsertMatrix();
Print(mat);
Gauss::GaussJordan(mat, true, true);
Print(mat);
}
int main(int argc, char** argv) {
test();
prompt();
return 0;
}