DGtal 1.3.0
Loading...
Searching...
No Matches
CLinearAlgebra.h
1
17#pragma once
18
31#if defined(CLinearAlgebra_RECURSES)
32#error Recursive header files inclusion detected in CLinearAlgebra.h
33#else // defined(CLinearAlgebra_RECURSES)
35#define CLinearAlgebra_RECURSES
36
37#if !defined CLinearAlgebra_h
39#define CLinearAlgebra_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/math/linalg/CMatrix.h"
46#include "DGtal/math/linalg/CVector.h"
48
49namespace DGtal
50{
51namespace concepts
52{
54// class CLinearAlgebra
92template <typename V, typename M>
94{
95 // ----------------------- Concept checks ------------------------------
96public:
97 typedef V Vector;
98 typedef M Matrix;
99
102
103 BOOST_STATIC_ASSERT(( boost::is_same<typename Vector::Scalar, typename Matrix::Scalar>::value ));
104
106 {
107 x = a * y;
108 c = a * b;
109 }
110 // ------------------------- Private Datas --------------------------------
111private:
113 const Matrix a, b;
115 const Vector y;
116
117 // ------------------------- Internals ------------------------------------
118private:
119
120}; // end of concept CLinearAlgebra
121}
122} // namespace DGtal
123
124// //
126
127#endif // !defined CLinearAlgebra_h
128
129#undef CLinearAlgebra_RECURSES
130#endif // else defined(CLinearAlgebra_RECURSES)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Check right multiplication between matrix and vector and internal matrix multiplication....
BOOST_STATIC_ASSERT((boost::is_same< typename Vector::Scalar, typename Matrix::Scalar >::value))
BOOST_CONCEPT_ASSERT((CVector< Vector >))
BOOST_CONCEPT_ASSERT((CMatrix< Matrix >))
Aim: Represent any static or dynamic sized matrix having sparse or dense representation.
Definition: CMatrix.h:91
Aim: Represent any static or dynamic sized column vector having sparse or dense representation.
Definition: CVector.h:91