DGtal  1.1.0
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:
113  const Matrix a, b;
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)
DGtal::concepts::CLinearAlgebra::c
Matrix c
Definition: CLinearAlgebra.h:112
DGtal::concepts::CLinearAlgebra::Vector
V Vector
Definition: CLinearAlgebra.h:97
DGtal::concepts::CLinearAlgebra::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CLinearAlgebra)
Definition: CLinearAlgebra.h:105
DGtal::concepts::CLinearAlgebra::a
const Matrix a
Definition: CLinearAlgebra.h:113
DGtal::concepts::CLinearAlgebra::y
const Vector y
Definition: CLinearAlgebra.h:115
DGtal::concepts::CLinearAlgebra::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((boost::is_same< typename Vector::Scalar, typename Matrix::Scalar >::value))
DGtal::concepts::CLinearAlgebra::x
Vector x
Definition: CLinearAlgebra.h:114
DGtal::concepts::CVector
Aim: Represent any static or dynamic sized column vector having sparse or dense representation.
Definition: CVector.h:91
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::concepts::CLinearAlgebra::b
const Matrix b
Definition: CLinearAlgebra.h:113
DGtal::concepts::CLinearAlgebra::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CMatrix< Matrix >))
DGtal::concepts::CMatrix
Aim: Represent any static or dynamic sized matrix having sparse or dense representation.
Definition: CMatrix.h:91
DGtal::concepts::CLinearAlgebra::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CVector< Vector >))
DGtal::concepts::CLinearAlgebra::Matrix
M Matrix
Definition: CLinearAlgebra.h:98
DGtal::concepts::CLinearAlgebra
Aim: Check right multiplication between matrix and vector and internal matrix multiplication....
Definition: CLinearAlgebra.h:94