DGtal  1.3.beta
DiscreteExteriorCalculusFactory.h
1 
17 #pragma once
18 
31 #if defined(DiscreteExteriorCalculusFactory_RECURSES)
32 #error Recursive header files inclusion detected in DiscreteExteriorCalculusFactory.h
33 #else // defined(DiscreteExteriorCalculusFactory_RECURSES)
34 
35 #define DiscreteExteriorCalculusFactory_RECURSES
36 
37 #if !defined DiscreteExteriorCalculusFactory_h
38 
39 #define DiscreteExteriorCalculusFactory_h
40 
42 #include "DGtal/dec/DiscreteExteriorCalculus.h"
43 #include "DGtal/topology/DigitalSurface.h"
45 
46 namespace DGtal
47 {
48 
50 // class DiscreteExteriorCalculusFactory
60 template <typename TLinearAlgebraBackend, typename TInteger = DGtal::int32_t>
61 class DiscreteExteriorCalculusFactory
62 {
63  // ----------------------- Standard services ------------------------------
64 public:
65 
66  typedef typename TLinearAlgebraBackend::DenseVector DenseVector;
69 
71 
77 
86  template <typename TDigitalSet>
87  static
89  createFromDigitalSet(const TDigitalSet& set, const bool add_border = true);
90 
101  template <Dimension dimEmbedded, typename TNSCellConstIterator>
102  static
104  createFromNSCells(const TNSCellConstIterator& begin, const TNSCellConstIterator& end, const bool add_border = true);
105 
118  template <DGtal::Dimension dimEmbedded, typename TNSCellConstIterator, typename TSCellMeasureFunctor>
119  static
121  createFromNSCells(const TNSCellConstIterator& begin, const TNSCellConstIterator& end, const TSCellMeasureFunctor& normalFunctor, const double h, const bool add_border = true);
122 
123  // ----------------------- Interface --------------------------------------
124 public:
125 
126  // ------------------------- Protected Datas ------------------------------
127 private:
128  // ------------------------- Private Datas --------------------------------
129 private:
130 
131  // ------------------------- Hidden services ------------------------------
132 protected:
133 
143  template <typename KSpace, typename CellsSet>
144  static
145  void
146  insertAllLowerIncidentCells(const KSpace& kspace, const typename CellsSet::value_type& cell, CellsSet& cells_set);
147 
158  template <typename KSpace, typename CellsAccum>
159  static
160  void
161  accumulateAllLowerIncidentCells(const KSpace& kspace, const typename CellsAccum::key_type& cell, CellsAccum& cells_accum);
162 
176  template <typename KSpace, typename CellsAccum, typename MeasureAccum>
177  static
178  void
179  accumulateAllLowerIncidentCells(const KSpace& kspace, const typename CellsAccum::key_type& cell, CellsAccum& cells_accum, CellsAccum& local_accum, MeasureAccum& cell_to_measure, const double measure);
180 
181 private:
182 
188 
189 
196 
204 
205  // ------------------------- Internals ------------------------------------
206 private:
207 
208 }; // end of class DiscreteExteriorCalculusFactory
209 
210 } // namespace DGtal
211 
212 
214 // Includes inline functions.
215 #if !defined(BUILD_INLINE)
216 #include "DGtal/dec/DiscreteExteriorCalculusFactory.ih"
217 #endif
218 
219 
220 // //
222 
223 #endif // !defined DiscreteExteriorCalculusFactory_h
224 
225 #undef DiscreteExteriorCalculusFactory_RECURSES
226 #endif // else defined(DiscreteExteriorCalculusFactory_RECURSES)
DGtal::DiscreteExteriorCalculus
Aim: DiscreteExteriorCalculus represents a calculus in the dec package. This is the main structure in...
Definition: DiscreteExteriorCalculus.h:97
DGtal::DiscreteExteriorCalculusFactory::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
DGtal::concepts::CInteger
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:87
DGtal::concepts::CDynamicVector
Aim: Represent any dynamic sized column vector having sparse or dense representation.
Definition: CDynamicVector.h:88
DGtal::DiscreteExteriorCalculusFactory::DenseMatrix
TLinearAlgebraBackend::DenseMatrix DenseMatrix
Definition: DiscreteExteriorCalculusFactory.h:67
DGtal::DiscreteExteriorCalculusFactory::accumulateAllLowerIncidentCells
static void accumulateAllLowerIncidentCells(const KSpace &kspace, const typename CellsAccum::key_type &cell, CellsAccum &cells_accum)
SparseMatrix
EigenLinearAlgebraBackend::SparseMatrix SparseMatrix
Definition: testHeatLaplace.cpp:50
DGtal::DiscreteExteriorCalculusFactory::createFromDigitalSet
static DiscreteExteriorCalculus< TDigitalSet::Point::dimension, TDigitalSet::Point::dimension, TLinearAlgebraBackend, TInteger > createFromDigitalSet(const TDigitalSet &set, const bool add_border=true)
DGtal::DiscreteExteriorCalculusFactory::DenseVector
TLinearAlgebraBackend::DenseVector DenseVector
Definition: DiscreteExteriorCalculusFactory.h:66
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::DiscreteExteriorCalculusFactory
Aim: This class provides static members to create DEC structures from various other DGtal structures.
Definition: DiscreteExteriorCalculus.h:70
DenseMatrix
EigenLinearAlgebraBackend::DenseMatrix DenseMatrix
Definition: testHeatLaplace.cpp:51
DGtal::DiscreteExteriorCalculusFactory::operator=
DiscreteExteriorCalculusFactory & operator=(const DiscreteExteriorCalculusFactory &other)
DGtal::concepts::CDynamicMatrix
Aim: Represent any dynamic sized matrix having sparse or dense representation.
Definition: CDynamicMatrix.h:88
DGtal::DiscreteExteriorCalculusFactory::insertAllLowerIncidentCells
static void insertAllLowerIncidentCells(const KSpace &kspace, const typename CellsSet::value_type &cell, CellsSet &cells_set)
DGtal::DiscreteExteriorCalculusFactory::DiscreteExteriorCalculusFactory
DiscreteExteriorCalculusFactory()
DGtal::DiscreteExteriorCalculusFactory::createFromNSCells
static DiscreteExteriorCalculus< dimEmbedded, TNSCellConstIterator::value_type::Point::dimension, TLinearAlgebraBackend, TInteger > createFromNSCells(const TNSCellConstIterator &begin, const TNSCellConstIterator &end, const bool add_border=true)
DGtal::DiscreteExteriorCalculusFactory::SparseMatrix
TLinearAlgebraBackend::SparseMatrix SparseMatrix
Definition: DiscreteExteriorCalculusFactory.h:68
DGtal::concepts::CLinearAlgebra
Aim: Check right multiplication between matrix and vector and internal matrix multiplication....
Definition: CLinearAlgebra.h:93
DGtal::KhalimskySpaceND
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
Definition: KhalimskySpaceND.h:64