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/Vect.h
2024-02-23 10:14:23 +01:00

58 lines
1.0 KiB
C++

#pragma once
#include "Matrix.h"
// espace vectoriel
class Vect {
private:
Matrix m_Data;
public:
/**
* \brief Construit une base d'un espace vectoriel à partir des colonnes d'une matrice.
* Ne prend pas en compte les colonnes de 0
* \param mat Une matrice échelonnée.
*/
Vect(const Matrix& mat);
/**
* \brief Affiche la base de l'espace vectoriel dans la console
*/
void Print() const;
std::size_t GetDimension() const;
std::size_t GetCardinal() const;
Matrix GetLinearSystem() const;
/**
* \brief Concatène la base actuelle avec un nouveau vecteur
* \param mat Une matrice colonne de taille GetDimension()
*/
void AddVector(const Matrix& mat);
bool operator==(const Vect& other) const;
bool operator!=(const Vect& other) const;
private:
void Simplify();
};
class VectAffine {
private:
Vect m_Base;
Matrix m_Origin;
public:
VectAffine(const Vect& base, const Matrix& origin);
void Print() const;
const Vect& GetBase() const {
return m_Base;
}
const Matrix& GetOrigin() const {
return m_Origin;
}
};