31#if defined(SimpleMatrix_RECURSES)
32#error Recursive header files inclusion detected in SimpleMatrix.h
35#define SimpleMatrix_RECURSES
37#if !defined 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>
233 template<
typename TComponentOther>
439 template <
typename T, DGtal::Dimension M, DGtal::Dimension N>
447 template <
typename TComponent, DGtal::Dimension TM, DGtal::Dimension TN>
456#include "DGtal/math/linalg/SimpleMatrixSpecializations.h"
457#include "DGtal/math/linalg/SimpleMatrix.ih"
464#undef SimpleMatrix_RECURSES
Aim: Implements basic operations that will be used in Point and Vector classes.
Aim: implements basic MxN Matrix services (M,N>=1).
SimpleMatrix(std::initializer_list< TComponent > values)
SimpleMatrix< Component, TM, TN > Self
Self & operator*=(const Component &aScalar)
std::array< Component, M *N > myCofactorCoefs
Component minorDeterminant(const DGtal::Dimension i, const DGtal::Dimension j) const
Component & operator()(const DGtal::Dimension i, const DGtal::Dimension j)
SimpleMatrix< Component, TM, TN > inverse() const
Component determinant() const
static const DGtal::Dimension M
ColumnVector column(const DGtal::Dimension j) const
ColumnVector operator*(const RowVector &aVector) const
Self & operator=(const SimpleMatrix< TComponentOther, M, N > &aMatrix)
SimpleMatrix< Component, TN, TM > transpose() const
Self operator+(const Self &aMatrix) const
Self & operator-=(const Self &aMatrix)
Component operator()(const DGtal::Dimension i, const DGtal::Dimension j) const
Self operator/(const Component &aScalar) const
SimpleMatrix & operator=(const Self &other)=default
RowVector row(const DGtal::Dimension i) const
static const DGtal::Dimension N
Self & operator+=(const Self &aMatrix)
void selfDisplay(std::ostream &out) const
Component cofactor(const DGtal::Dimension i, const DGtal::Dimension j) const
void setComponent(const DGtal::Dimension i, const DGtal::Dimension j, const Component &aValue)
PointVector< M, Component > ColumnVector
void constant(const Component &aScalar)
Self operator*(const Component &aScalar) const
Dimension Index
Types needed by CLinearAlgebraContainer.
std::array< Component, M *N > myValues
Matrix values containers.
SimpleMatrix(const Self &other)
SimpleMatrix< Component, TM, TM > operator*(const SimpleMatrix< Component, N, M > &aMatrix) const
BOOST_CONCEPT_ASSERT((concepts::CEuclideanRing< TComponent >))
Self operator-(const Self &aMatrix) const
Self & operator/=(const Component &aScalar)
PointVector< N, Component > RowVector
bool operator==(const Self &aMatrix) const
BOOST_STATIC_ASSERT(TM > 0)
DGtal is the top-level namespace which contains all DGtal functions and types.
KForm< Calculus, order, duality > operator*(const typename Calculus::Scalar &scalar, const KForm< Calculus, order, duality > &form)
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::uint32_t Dimension
Aim: Defines the mathematical concept equivalent to a unitary commutative ring with a division operat...