DGtal  1.5.beta
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)
35 #define DiscreteExteriorCalculusSolver_RECURSES
36 
37 #if !defined DiscreteExteriorCalculusSolver_h
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:
96 
101 
106  void selfDisplay(std::ostream& out) const;
107 
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&
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)
Aim: This wraps a linear algebra solver around a discrete exterior calculus.
BOOST_STATIC_ASSERT((order_out<=TCalculus::dimensionEmbedded))
KForm< Calculus, order_out, duality_out > InputKForm
BOOST_STATIC_ASSERT((order_in<=TCalculus::dimensionEmbedded))
SolutionKForm solve(const InputKForm &input_kform) const
DiscreteExteriorCalculusSolver & compute(const Operator &linear_operator)
LinearOperator< Calculus, order_in, duality_in, order_out, duality_out > Operator
void selfDisplay(std::ostream &out) const
KForm< Calculus, order_in, duality_in > SolutionKForm
Aim: KForm represents discrete kforms in the dec package.
Definition: KForm.h:66
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.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)