DGtal  0.9.2
DiscreteExteriorCalculusSolver.h
1 
17 #pragma once
18 
31 #if defined(DiscreteExteriorCalculusSolver_RECURSES)
32 #error Recursive header files inclusion detected in DiscreteExteriorCalculusSolver.h
33 #else // defined(DiscreteExteriorCalculusSolver_RECURSES)
34 
35 #define DiscreteExteriorCalculusSolver_RECURSES
36 
37 #if !defined DiscreteExteriorCalculusSolver_h
38 
39 #define DiscreteExteriorCalculusSolver_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConstAlias.h"
46 #include "DGtal/base/Clone.h"
47 #include "DGtal/dec/KForm.h"
48 #include "DGtal/dec/LinearOperator.h"
50 
51 namespace DGtal
52 {
53 
55  // template class DiscreteExteriorCalculusSolver
68  template <typename TCalculus, typename TLinearAlgebraSolver, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
70  {
71  // ----------------------- Standard services ------------------------------
72  public:
73  BOOST_STATIC_ASSERT(( order_in >= 0 ));
74  BOOST_STATIC_ASSERT(( order_in <= TCalculus::dimensionEmbedded ));
75  BOOST_STATIC_ASSERT(( order_out >= 0 ));
76  BOOST_STATIC_ASSERT(( order_out <= TCalculus::dimensionEmbedded ));
77 
78  typedef TCalculus Calculus;
79  typedef TLinearAlgebraSolver LinearAlgebraSolver;
80 
84 
89 
90  // ----------------------- Interface --------------------------------------
91  public:
95  const Calculus* myCalculus;
96 
100  LinearAlgebraSolver myLinearAlgebraSolver;
101 
106  void selfDisplay(std::ostream& out) const;
107 
113  DiscreteExteriorCalculusSolver& compute(const Operator& linear_operator);
114 
120  SolutionKForm solve(const InputKForm& input_kform) const;
121 
126  bool isValid() const;
127 
128  // ------------------------- Private Datas --------------------------------
129  private:
130 
131  // ------------------------- Hidden services ------------------------------
132  protected:
133 
134  // ------------------------- Internals ------------------------------------
135  private:
136 
137  }; // end of class DiscreteExteriorCalculusSolver
138 
139 
146  template <typename C, typename S, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
147  std::ostream&
148  operator<<(std::ostream& out, const DiscreteExteriorCalculusSolver<C, S, order_in, duality_in, order_out, duality_out>& object);
149 
150 } // namespace DGtal
151 
152 
154 // Includes inline functions.
155 #include "DGtal/dec/DiscreteExteriorCalculusSolver.ih"
156 
157 // //
159 
160 #endif // !defined DiscreteExteriorCalculusSolver_h
161 
162 #undef DiscreteExteriorCalculusSolver_RECURSES
163 #endif // else defined(DiscreteExteriorCalculusSolver_RECURSES)
SolutionKForm solve(const InputKForm &input_kform) const
Aim: KForm represents discrete kforms in the dec package.
Definition: KForm.h:65
DiscreteExteriorCalculusSolver & compute(const Operator &linear_operator)
KForm< Calculus, order_in, duality_in > SolutionKForm
KForm< Calculus, order_out, duality_out > InputKForm
Aim: LinearOperator represents discrete linear operator between discrete kforms in the DEC package...
DGtal is the top-level namespace which contains all DGtal functions and types.
LinearOperator< Calculus, order_in, duality_in, order_out, duality_out > Operator
Aim: This wraps a linear algebra solver around a discrete exterior calculus.
void selfDisplay(std::ostream &out) const