31 #if defined(SimpleMatrix_RECURSES) 32 #error Recursive header files inclusion detected in SimpleMatrix.h 33 #else // defined(SimpleMatrix_RECURSES) 35 #define SimpleMatrix_RECURSES 37 #if !defined SimpleMatrix_h 39 #define SimpleMatrix_h 44 #include "DGtal/base/Common.h" 45 #include "DGtal/kernel/CEuclideanRing.h" 46 #include "DGtal/kernel/PointVector.h" 47 #include "DGtal/kernel/NumberTraits.h" 74 template <
typename TComponent, DGtal::Dimension TM, DGtal::Dimension TN>
125 void constant(
const Component &aScalar);
147 inline Index
rows()
const {
return M; }
161 inline Index
cols()
const {
return N; }
174 const Component & aValue);
214 template<
typename TComponentOther>
224 Self
operator+(
const Self & aMatrix)
const;
243 Self
operator-(
const Self & aMatrix)
const;
261 Self
operator*(
const Component & aScalar)
const;
279 Self
operator/(
const Component & aScalar)
const;
288 Self &
operator/=(
const Component & aScalar) ;
310 ColumnVector
operator*(
const RowVector & aVector)
const;
420 template <
typename T, DGtal::Dimension M, DGtal::Dimension N>
422 operator<< ( std::ostream & out, const SimpleMatrix<T,M,N> & object );
428 template <
typename TComponent, DGtal::Dimension TM, DGtal::Dimension TN>
437 #include "DGtal/math/linalg/SimpleMatrixSpecializations.h" 438 #include "DGtal/math/linalg/SimpleMatrix.ih" 443 #endif // !defined SimpleMatrix_h 445 #undef SimpleMatrix_RECURSES 446 #endif // else defined(SimpleMatrix_RECURSES) Self & operator/=(const Component &aScalar)
Self operator+(const Self &aMatrix) const
SimpleMatrix< Component, TM, TN > Self
DGtal::uint32_t Dimension
std::array< Component, M *N > myCofactorCoefs
Self operator-(const Self &aMatrix) const
BOOST_STATIC_ASSERT(TM > 0)
SimpleMatrix< Component, TM, TN > inverse() const
Aim: Implements basic operations that will be used in Point and Vector classes.
Component minorDeterminant(const DGtal::Dimension i, const DGtal::Dimension j) const
RowVector row(const DGtal::Dimension i) const
PointVector< M, Component > ColumnVector
Aim: implements basic MxN Matrix services (M,N>=1).
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...
Self & operator*=(const Component &aScalar)
bool operator==(const Self &aMatrix) const
void setComponent(const DGtal::Dimension i, const DGtal::Dimension j, const Component &aValue)
Self & operator-=(const Self &aMatrix)
std::array< Component, M *N > myValues
Matrix values containers.
DGtal is the top-level namespace which contains all DGtal functions and types.
Component operator()(const DGtal::Dimension i, const DGtal::Dimension j) const
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< TComponent >))
void constant(const Component &aScalar)
ColumnVector column(const DGtal::Dimension j) const
Dimension Index
Types needed by CLinearAlgebraContainer.
Self & operator=(const SimpleMatrix< TComponentOther, M, N > &aMatrix)
Self operator*(const Component &aScalar) const
Self operator/(const Component &aScalar) const
Component determinant() const
void selfDisplay(std::ostream &out) const
static const DGtal::Dimension N
SimpleMatrix< Component, TN, TM > transpose() const
PointVector< N, Component > RowVector
Self & operator+=(const Self &aMatrix)
static const DGtal::Dimension M