diff --git a/src/Vect.cpp b/src/Vect.cpp index d49695c..1dad13f 100644 --- a/src/Vect.cpp +++ b/src/Vect.cpp @@ -22,11 +22,15 @@ void Vect::Simplify() { } void Vect::Print() const { - std::cout << "Espace vectoriel de dimension " << m_Data.GetColumnCount() << " de base :\n\n"; + std::cout << "Espace vectoriel de dimension " << GetDimension() << " de base :\n\n"; for (std::size_t i = 0; i < m_Data.GetRawCount(); i++) { for (std::size_t j = 0; j < m_Data.GetColumnCount(); j++) { printf("[ %.3f ]\t", static_cast(m_Data.at(i, j))); } std::cout << "\n"; } +} + +std::size_t Vect::GetDimension() const { + return m_Data.GetColumnCount(); } \ No newline at end of file diff --git a/src/Vect.h b/src/Vect.h index 0a5782d..a99c3ba 100644 --- a/src/Vect.h +++ b/src/Vect.h @@ -20,6 +20,8 @@ class Vect { */ void Print() const; + std::size_t GetDimension() const; + private: void Simplify(); }; \ No newline at end of file