big internal rework
This commit is contained in:
31
src/main.cpp
31
src/main.cpp
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user