DGtal  0.9.2
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)
34 
35 #define CLinearAlgebra_RECURSES
36 
37 #if !defined CLinearAlgebra_h
38 
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 
49 namespace DGtal
50 {
51 namespace concepts
52 {
54 // class CLinearAlgebra
92 template <typename V, typename M>
94 {
95  // ----------------------- Concept checks ------------------------------
96 public:
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 --------------------------------
111 private:
112  Matrix c;
113  const Matrix a, b;
114  Vector x;
115  const Vector y;
116 
117  // ------------------------- Internals ------------------------------------
118 private:
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)
Aim: Check right multiplication between matrix and vector and internal matrix multiplication. Matrix and vector scalar types should be the same.
Aim: Represent any static or dynamic sized matrix having sparse or dense representation.
Definition: CMatrix.h:90
Aim: Represent any static or dynamic sized column vector having sparse or dense representation.
Definition: CVector.h:90
BOOST_STATIC_ASSERT((boost::is_same< typename Vector::Scalar, typename Matrix::Scalar >::value))
DGtal is the top-level namespace which contains all DGtal functions and types.
BOOST_CONCEPT_ASSERT((CVector< Vector >))