DGtal  1.5.beta
LinearOperator.h
1 
17 #pragma once
18 
31 #if defined(LinearOperator_RECURSES)
32 #error Recursive header files inclusion detected in LinearOperator.h
33 #else // defined(LinearOperator_RECURSES)
35 #define LinearOperator_RECURSES
36 
37 #if !defined LinearOperator_h
39 #define LinearOperator_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/Duality.h"
48 #include "DGtal/dec/KForm.h"
50 
51 namespace DGtal
52 {
53 
55  // template class LinearOperator
67 template <typename TCalculus, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
69  {
70  // ----------------------- Standard services ------------------------------
71  public:
72  typedef TCalculus Calculus;
73 
74  BOOST_STATIC_ASSERT(( order_in >= 0 ));
75  BOOST_STATIC_ASSERT(( order_in <= Calculus::dimensionEmbedded ));
76  BOOST_STATIC_ASSERT(( order_out >= 0 ));
77  BOOST_STATIC_ASSERT(( order_out <= Calculus::dimensionEmbedded ));
78 
82  typedef typename Calculus::Scalar Scalar;
89 
90 
96 
103 
110 
111  // ----------------------- Interface --------------------------------------
112  public:
113 
118 
123 
128  void selfDisplay(std::ostream& out) const;
129 
134 
138  void clear();
139 
144  bool isValid() const;
145 
146  // ------------------------- Private Datas --------------------------------
147  private:
148 
149  // ------------------------- Hidden services ------------------------------
150  protected:
151 
157 
158  // ------------------------- Internals ------------------------------------
159  private:
160 
161  }; // end of class LinearOperator
162 
163 
170  template <typename Calculus, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
171  std::ostream&
172  operator<<(std::ostream& out,
174 
181  template <typename Calculus, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
185 
192  template <typename Calculus, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
196 
203  template <typename Calculus, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
205  operator*(const typename Calculus::Scalar& scalar,
207 
214  template <typename Calculus, Order order_in, Duality duality_in, Order order_fold, Duality duality_fold, Order order_out, Duality duality_out>
218 
225  template <typename Calculus, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
228  const KForm<Calculus, order_in, duality_in>& input_form);
229 
235  template <typename Calculus, Order order_in, Duality duality_in, Order order_out, Duality duality_out>
238 
239 } // namespace DGtal
240 
241 
243 // Includes inline functions.
244 #include "DGtal/dec/LinearOperator.ih"
245 
246 // //
248 
249 #endif // !defined LinearOperator_h
250 
251 #undef LinearOperator_RECURSES
252 #endif // else defined(LinearOperator_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
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.
LinearOperator(ConstAlias< Calculus > calculus, const Container &container)
void selfDisplay(std::ostream &out) const
LinearOperator & operator=(const LinearOperator &other)
BOOST_STATIC_ASSERT((order_out<=Calculus::dimensionEmbedded))
bool isValid() const
BOOST_STATIC_ASSERT((order_out >=0))
const Calculus * myCalculus
LinearOperator(ConstAlias< Calculus > calculus)
Calculus::Scalar Scalar
Calculus scalar type.
BOOST_STATIC_ASSERT((order_in >=0))
BOOST_STATIC_ASSERT((order_in<=Calculus::dimensionEmbedded))
Calculus::SparseMatrix Container
Container typr.
LinearOperator< Calculus, order_out, duality_out, order_in, duality_in > TransposedLinearOperator
Transposed operator type.
KForm< Calculus, order_in, duality_in > InputKForm
Input KForm type.
KForm< Calculus, order_out, duality_out > OutputKForm
Output KForm type.
TransposedLinearOperator transpose() const
PolyCalculus * calculus
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
KForm< Calculus, order, duality > operator*(const typename Calculus::Scalar &scalar, const KForm< Calculus, order, duality > &form)
KForm< Calculus, order, duality > operator-(const KForm< Calculus, order, duality > &form_a, const KForm< Calculus, order, duality > &form_b)
Circulator< TIterator > operator+(typename IteratorCirculatorTraits< TIterator >::Difference d, Circulator< TIterator > &object)
Definition: Circulator.h:453
EigenLinearAlgebraBackend::SparseMatrix SparseMatrix