DGtal 1.4.0
Loading...
Searching...
No Matches
KForm.h
1
17#pragma once
18
31#if defined(KForm_RECURSES)
32#error Recursive header files inclusion detected in KForm.h
33#else // defined(KForm_RECURSES)
35#define KForm_RECURSES
36
37#if !defined KForm_h
39#define KForm_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"
49
50namespace DGtal
51{
52
54 // template class KForm
64 template <typename TCalculus, Order order, Duality duality>
65 class KForm
66 {
67 // ----------------------- Standard services ------------------------------
68 public:
69 typedef TCalculus Calculus;
70
71 BOOST_STATIC_ASSERT(( order >= 0 ));
72 BOOST_STATIC_ASSERT(( order <= Calculus::dimensionEmbedded ));
73
74 typedef typename Calculus::DenseVector Container;
75 typedef typename Calculus::Scalar Scalar;
76 typedef typename Calculus::SCell SCell;
77 typedef typename Calculus::Index Index;
78
83 static
86
92 static
95
101 static
103 dirac(ConstAlias<Calculus> calculus, const typename Calculus::Cell& cell);
104
110
117
123 KForm& operator=(const KForm& other);
124
125 // ----------------------- Interface --------------------------------------
126 public:
127
132
137
142 void selfDisplay(std::ostream& out) const;
143
147 std::string className() const;
148
152 void clear();
153
159 SCell getSCell(const Index& index) const;
160
165 Index length() const;
166
171 bool isValid() const;
172
173 // ------------------------- Private Datas --------------------------------
174 private:
175
176 // ------------------------- Hidden services ------------------------------
177 protected:
178
184
185 // ------------------------- Internals ------------------------------------
186 private:
187
188 }; // end of class KForm
189
196 template <typename Calculus, Order order, Duality duality>
197 std::ostream&
198 operator<<(std::ostream& out, const KForm<Calculus, order, duality>& object);
199
206 template <typename Calculus, Order order, Duality duality>
209
216 template <typename Calculus, Order order, Duality duality>
219
226 template <typename Calculus, Order order, Duality duality>
228 operator*(const typename Calculus::Scalar& scalar, const KForm<Calculus, order, duality>& form);
229
235 template <typename Calculus, Order order, Duality duality>
238
239} // namespace DGtal
240
241
243// Includes inline functions.
244#include "DGtal/dec/KForm.ih"
245
246// //
248
249#endif // !defined KForm_h
250
251#undef KForm_RECURSES
252#endif // else defined(KForm_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
const Calculus * myCalculus
Definition KForm.h:136
Container myContainer
Definition KForm.h:131
Index length() const
static KForm< TCalculus, order, duality > zeros(ConstAlias< Calculus > calculus)
bool isValid() const
Calculus::Scalar Scalar
Definition KForm.h:75
KForm & operator=(const KForm &other)
Calculus::SCell SCell
Definition KForm.h:76
void selfDisplay(std::ostream &out) const
BOOST_STATIC_ASSERT((order >=0))
std::string className() const
Calculus::DenseVector Container
Definition KForm.h:74
Calculus::Index Index
Definition KForm.h:77
KForm(ConstAlias< Calculus > calculus, const Container &container)
static KForm< TCalculus, order, duality > dirac(ConstAlias< Calculus > calculus, const typename Calculus::Cell &cell)
SCell getSCell(const Index &index) const
KForm(ConstAlias< Calculus > calculus)
TCalculus Calculus
Definition KForm.h:69
static KForm< TCalculus, order, duality > ones(ConstAlias< Calculus > calculus)
BOOST_STATIC_ASSERT((order<=Calculus::dimensionEmbedded))
PolyCalculus * calculus
DGtal is the top-level namespace which contains all DGtal functions and types.
KForm< Calculus, order, duality > operator*(const typename Calculus::Scalar &scalar, const KForm< Calculus, order, duality > &form)
Circulator< TIterator > operator+(typename IteratorCirculatorTraits< TIterator >::Difference d, Circulator< TIterator > &object)
Definition Circulator.h:453
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
KForm< Calculus, order, duality > operator-(const KForm< Calculus, order, duality > &form_a, const KForm< Calculus, order, duality > &form_b)