vectorial space to linear equation
All checks were successful
Linux arm64 / Build (push) Successful in 30s

This commit is contained in:
2024-02-14 22:22:59 +01:00
parent 4ffeea8900
commit a1d74ec126
4 changed files with 25 additions and 4 deletions

View File

@@ -1,11 +1,11 @@
#include "Matrix.h"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <fstream>
#include <iostream>
#include "Matrix.h"
Matrix::Matrix(const std::string& fileNameInput) {
Load(fileNameInput);
}

View File

@@ -1,4 +1,6 @@
#include "Vect.h"
#include "Solver.h"
#include <iostream>
Vect::Vect(const Matrix& mat) : m_Data(mat) {
@@ -21,6 +23,16 @@ void Vect::Simplify() {
m_Data = mat;
}
Matrix Vect::GetLinearSystem() const {
Matrix vect = m_Data;
vect.Transpose();
Solver solver {vect};
vect = solver.Noyau().m_Data;
vect.Transpose();
return vect;
}
void Vect::Print() const {
std::cout << "Espace vectoriel de dimension " << GetDimension() << " de base :\n\n";
for (std::size_t i = 0; i < m_Data.GetRawCount(); i++) {

View File

@@ -22,6 +22,8 @@ class Vect {
std::size_t GetDimension() const;
Matrix GetLinearSystem() const;
private:
void Simplify();
};

View File

@@ -21,10 +21,17 @@ void test() {
Solver solver{mat2};
Vect image = solver.Image();
Vect noyau = solver.Noyau();
std::cout << "\tImage :\n";
solver.Image().Print();
image.Print();
std::cout << "Système :\n";
image.GetLinearSystem().Print();
std::cout << "\tNoyau :\n";
solver.Noyau().Print();
noyau.Print();
std::cout << "Système :\n";
noyau.GetLinearSystem().Print();
}
void prompt() {