This commit is contained in:
14
src/Matrix.h
14
src/Matrix.h
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -15,6 +17,9 @@ class Matrix {
|
||||
Matrix(std::size_t lignes, std::size_t colonnes, std::initializer_list<long double>&& initList);
|
||||
~Matrix();
|
||||
|
||||
std::size_t GetRawCount() const;
|
||||
std::size_t GetColumnCount() const;
|
||||
|
||||
Matrix operator*(const Matrix& other) const;
|
||||
|
||||
void GaussNonJordan(bool reduite);
|
||||
@@ -31,12 +36,14 @@ class Matrix {
|
||||
|
||||
void Load(const std::string& filename);
|
||||
|
||||
void Transpose();
|
||||
Matrix Transpose() const;
|
||||
|
||||
void Identity();
|
||||
|
||||
bool IsInversed() const;
|
||||
|
||||
Matrix SubMatrix(std::size_t origine_ligne, std::size_t origine_colonne, std::size_t ligne, std::size_t colonne) const;
|
||||
|
||||
bool operator==(const Matrix& other) const;
|
||||
|
||||
long double& operator[](std::size_t indice);
|
||||
@@ -46,4 +53,7 @@ class Matrix {
|
||||
long double at(std::size_t ligne, std::size_t colonne) const;
|
||||
};
|
||||
|
||||
static bool IsEqualZero(long double var);
|
||||
template <typename T>
|
||||
bool IsEqualZero(T var) {
|
||||
return std::abs(var) < std::pow(10, -5);
|
||||
}
|
||||
Reference in New Issue
Block a user