DGtal  1.3.beta
CLinearAlgebraSolver.h
1
17 #pragma once
18
31 #if defined(CLinearAlgebraSolver_RECURSES)
32 #error Recursive header files inclusion detected in CLinearAlgebraSolver.h
33 #else // defined(CLinearAlgebraSolver_RECURSES)
34
35 #define CLinearAlgebraSolver_RECURSES
36
37 #if !defined CLinearAlgebraSolver_h
38
39 #define CLinearAlgebraSolver_h
40
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/math/linalg/CLinearAlgebra.h"
47
48 namespace DGtal
49 {
50 namespace concepts
51 {
53 // class CLinearAlgebraSolver
102 template <typename S, typename V, typename M>
104 {
105  // ----------------------- Concept checks ------------------------------
106 public:
107  typedef S Solver;
108  typedef V Vector;
109  typedef M Matrix;
110
112
114  {
115  solver.compute(a);
116  status_return = static_cast<int>(const_solver.info());
117  x = const_solver.solve(y);
118  }
119  // ------------------------- Private Datas --------------------------------
120 private:
124  const Matrix a;
125  const Vector y;
126  V x;
127
128  // ------------------------- Internals ------------------------------------
129 private:
130
131 }; // end of concept CLinearAlgebraSolver
132 }
133 } // namespace DGtal
134
135 // //
137
138 #endif // !defined CLinearAlgebraSolver_h
139
140 #undef CLinearAlgebraSolver_RECURSES
141 #endif // else defined(CLinearAlgebraSolver_RECURSES)
DGtal::concepts::CLinearAlgebraSolver::a
const Matrix a
Definition: CLinearAlgebraSolver.h:124
boost::DefaultConstructible
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition: Boost.dox:30
DGtal::concepts::CLinearAlgebraSolver::Vector
V Vector
Definition: CLinearAlgebraSolver.h:108
DGtal::concepts::CLinearAlgebraSolver::Solver
S Solver
Definition: CLinearAlgebraSolver.h:107
DGtal::concepts::CLinearAlgebraSolver::const_solver
const Solver const_solver
Definition: CLinearAlgebraSolver.h:122
DGtal::concepts::CLinearAlgebraSolver
Aim: Describe a linear solver defined over a linear algebra. Problems are of the form:
Definition: CLinearAlgebraSolver.h:103
DGtal::concepts::CLinearAlgebraSolver::status_return
int status_return
Definition: CLinearAlgebraSolver.h:121
DGtal::concepts::CLinearAlgebraSolver::solver
Solver solver
Definition: CLinearAlgebraSolver.h:123
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CLinearAlgebraSolver::y
const Vector y
Definition: CLinearAlgebraSolver.h:125
DGtal::concepts::CLinearAlgebraSolver::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CLinearAlgebra< Vector, Matrix >))
DGtal::concepts::CLinearAlgebraSolver::Matrix
M Matrix
Definition: CLinearAlgebraSolver.h:109
DGtal::concepts::CLinearAlgebraSolver::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CLinearAlgebraSolver)
Definition: CLinearAlgebraSolver.h:113
DGtal::concepts::CLinearAlgebra
Aim: Check right multiplication between matrix and vector and internal matrix multiplication....
Definition: CLinearAlgebra.h:93