This commit is contained in:
28
src/main.cpp
28
src/main.cpp
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user