31 #if defined(DiscreteExteriorCalculus_RECURSES)
32 #error Recursive header files inclusion detected in DiscreteExteriorCalculus.h
33 #else // defined(DiscreteExteriorCalculus_RECURSES)
35 #define DiscreteExteriorCalculus_RECURSES
37 #if !defined DiscreteExteriorCalculus_h
39 #define DiscreteExteriorCalculus_h
47 #include <boost/array.hpp>
48 #include <boost/unordered_map.hpp>
49 #include "DGtal/kernel/SpaceND.h"
50 #include "DGtal/kernel/domains/HyperRectDomain.h"
51 #include "DGtal/base/Common.h"
52 #include "DGtal/topology/KhalimskySpaceND.h"
53 #include "DGtal/dec/Duality.h"
54 #include "DGtal/dec/KForm.h"
55 #include "DGtal/dec/LinearOperator.h"
56 #include "DGtal/dec/VectorField.h"
57 #include "DGtal/base/ConstAlias.h"
58 #include "DGtal/topology/CanonicSCellEmbedder.h"
60 #include <DGtal/kernel/sets/CDigitalSet.h>
61 #include <DGtal/math/linalg/CDynamicMatrix.h>
62 #include <DGtal/math/linalg/CDynamicVector.h>
63 #include <DGtal/math/linalg/CLinearAlgebra.h>
69 template <
typename TLinearAlgebraBackend,
typename TInteger>
77 template <Dimension dim,
typename TInteger>
96 template <Dimension dimEmbedded, Dimension dimAmbient,
typename TLinearAlgebraBackend,
typename TInteger = DGtal::
int32_t>
108 typedef typename LinearAlgebraBackend::DenseVector::Scalar
Scalar;
244 template <
typename TDomain>
350 template <Order order, Duality duality>
362 template <Order order, Duality duality,
typename TConstIterator>
364 reorder(
const TConstIterator& begin_range,
const TConstIterator& end_range)
const;
372 template <Order order, Duality duality>
382 template <Order order, Duality duality>
392 template <Order order, Duality duality>
400 template <Duality duality>
411 template <Duality duality>
413 heatLaplace(
const typename DenseVector::Scalar& h,
const typename DenseVector::Scalar& t,
const typename DenseVector::Scalar&
K)
const;
421 template <Order order, Duality duality>
431 template <Duality duality>
442 template <Duality duality>
452 template <Duality duality>
463 template <Duality duality>
598 template <Duality duality>
606 template <Duality duality>
619 template <Dimension dimEmbedded, Dimension dimAmbient,
typename TLinearAlgebraBackend,
typename TInteger>
628 #include "DGtal/dec/DiscreteExteriorCalculus.ih"
633 #endif // !defined DiscreteExteriorCalculus_h
635 #undef DiscreteExteriorCalculus_RECURSES
636 #endif // else defined(DiscreteExteriorCalculus_RECURSES)
LinearOperator< Self, 1, DUAL, 2, DUAL > DualDerivative1
DiscreteExteriorCalculus< dimEmbedded, dimAmbient, TLinearAlgebraBackend, TInteger > Self
LinearOperator< Self, 2, DUAL, 2, DUAL > DualIdentity2
BOOST_STATIC_ASSERT((boost::is_same< Dimension, Order >::value))
LinearAlgebraBackend::DenseVector DenseVector
DiscreteExteriorCalculus()
LinearAlgebraBackend::DenseMatrix DenseMatrix
LinearOperator< Self, 0, duality, 1, duality > flatDirectional(const Dimension &dir) const
KForm< Self, 2, DUAL > DualForm2
Index getCellIndex(const Cell &cell) const
Aim: DiscreteExteriorCalculus represents a calculus in the dec package. This is the main structure in...
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
LinearOperator< Self, 3, PRIMAL, dimEmbedded-3, DUAL > PrimalHodge3
LinearOperator< Self, 1, PRIMAL, 1, PRIMAL > PrimalIdentity1
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
LinearAlgebraBackend::DenseVector::Index Index
LinearOperator< Self, 2, DUAL, 1, DUAL > DualAntiderivative2
LinearOperator< Self, 0, PRIMAL, 1, PRIMAL > PrimalDerivative0
LinearOperator< Self, 3, DUAL, 2, DUAL > DualAntiderivative3
IndexedSCells myIndexSignedCells
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
Aim: Represent any dynamic sized column vector having sparse or dense representation.
LinearOperator< Self, order, duality, order, duality > identity() const
bool isCellFlipped(const Cell &cell) const
LinearOperator< Self, 3, DUAL, 3, DUAL > DualIdentity3
Scalar hodgeSign(const Cell &cell, const Duality &duality) const
VectorField< Self, DUAL > DualVectorField
LinearOperator< Self, 0, DUAL, 1, DUAL > DualDerivative0
LinearOperator< Self, 0, duality, 0, duality > laplace() const
LinearOperator< Self, 1, DUAL, dimEmbedded-1, PRIMAL > DualHodge1
DGtal::uint32_t Dimension
Properties::iterator Iterator
std::vector< SCell > SCells
LinearOperator< Self, 1, DUAL, 1, DUAL > DualIdentity1
LinearOperator< Self, order, duality, dimEmbedded-order, OppositeDuality< duality >::duality > hodge() const
ConstIterator begin() const
Dimension edgeDirection(const Cell &cell, const Duality &duality) const
Aim: LinearOperator represents discrete linear operator between discrete kforms in the DEC package.
Aim: VectorField represents a discrete vector field in the dec package. Vector field values are attac...
BOOST_STATIC_CONSTANT(Dimension, dimensionEmbedded=dimEmbedded)
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
boost::array< SCells, dimEmbedded+1 > IndexedSCells
KForm< Self, 3, DUAL > DualForm3
LinearOperator< Self, 0, PRIMAL, 0, PRIMAL > PrimalIdentity0
LinearOperator< Self, 0, duality, 0, duality > heatLaplace(const typename DenseVector::Scalar &h, const typename DenseVector::Scalar &t, const typename DenseVector::Scalar &K) const
ConstIterator end() const
LinearOperator< Self, 1, DUAL, 0, DUAL > DualAntiderivative1
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
EigenLinearAlgebraBackend::SparseMatrix SparseMatrix
LinearOperator< Self, order, duality, order, duality > reorder(const TConstIterator &begin_range, const TConstIterator &end_range) const
LinearOperator< Self, 0, DUAL, dimEmbedded-0, PRIMAL > DualHodge0
KForm< Self, 0, PRIMAL > PrimalForm0
void initKSpace(ConstAlias< TDomain > domain)
LinearOperator< Self, 3, DUAL, dimEmbedded-3, PRIMAL > DualHodge3
LinearAlgebraBackend::SparseMatrix SparseMatrix
KForm< Self, 0, DUAL > DualForm0
KForm< Self, 1, duality > flat(const VectorField< Self, duality > &vector_field) const
DGtal is the top-level namespace which contains all DGtal functions and types.
LinearOperator< Self, 0, DUAL, 0, DUAL > DualIdentity0
LinearOperator< Self, 0, PRIMAL, dimEmbedded-0, DUAL > PrimalHodge0
boost::array< boost::array< SparseMatrix, dimAmbient >, 2 > myFlatOperatorMatrixes
KForm< Self, 3, PRIMAL > PrimalForm3
boost::array< boost::array< SparseMatrix, dimAmbient >, 2 > mySharpOperatorMatrixes
LinearOperator< Self, order, duality, order+1, duality > derivative() const
bool eraseCell(const Cell &cell)
Aim: This class provides static members to create DEC structures from various other DGtal structures.
const SCells & getIndexedSCells() const
LinearOperator< Self, 1, duality, 0, duality > sharpDirectional(const Dimension &dir) const
unsigned int Order
Aim: Order is used as template parameter for DEC classes.
boost::unordered_map< Cell, Property > Properties
size_t hash_value(const KhalimskyCell< dim, TInteger > &cell)
LinearOperator< Self, order, duality, order-1, duality > antiderivative() const
LinearOperator< Self, 1, PRIMAL, 2, PRIMAL > PrimalDerivative1
Order actualOrder(const Order &order, const Duality &duality) const
LinearOperator< Self, 2, DUAL, 3, DUAL > DualDerivative2
KForm< Self, 1, PRIMAL > PrimalForm1
LinearOperator< Self, 1, PRIMAL, dimEmbedded-1, DUAL > PrimalHodge1
std::string className() const
EigenLinearAlgebraBackend::DenseMatrix DenseMatrix
LinearOperator< Self, 2, PRIMAL, 2, PRIMAL > PrimalIdentity2
bool myCachedOperatorsNeedUpdate
void updateFlatOperator()
Index kFormLength(const Order &order, const Duality &duality) const
TLinearAlgebraBackend LinearAlgebraBackend
VectorField< Self, PRIMAL > PrimalVectorField
Holds size 'primal_size', 'dual_size', 'index' and 'flipped' for each cell of the DEC object....
void selfDisplay(std::ostream &out) const
void updateSharpOperator()
const Properties & getProperties() const
LinearOperator< Self, 2, PRIMAL, dimEmbedded-2, DUAL > PrimalHodge2
bool insertSCell(const SCell &signed_cell)
bool containsCell(const Cell &cell) const
Aim: Represent any dynamic sized matrix having sparse or dense representation.
Properties::const_iterator ConstIterator
Properties myCellProperties
LinearOperator< Self, 2, PRIMAL, 3, PRIMAL > PrimalDerivative2
void updateCachedOperators()
LinearOperator< Self, 3, PRIMAL, 3, PRIMAL > PrimalIdentity3
LinearOperator< Self, 3, PRIMAL, 2, PRIMAL > PrimalAntiderivative3
LinearOperator< Self, 1, PRIMAL, 0, PRIMAL > PrimalAntiderivative1
LinearOperator< Self, 2, DUAL, dimEmbedded-2, PRIMAL > DualHodge2
KForm< Self, 1, DUAL > DualForm1
DGtal::KhalimskySpaceND< dimAmbient, TInteger > KSpace
Aim: Check right multiplication between matrix and vector and internal matrix multiplication....
Duality
Aim: Duality enumerator tells if templated object lives in primal or dual space. Used as template par...
LinearOperator< Self, 2, PRIMAL, 1, PRIMAL > PrimalAntiderivative2
KForm< Self, 2, PRIMAL > PrimalForm2
LinearAlgebraBackend::DenseVector::Scalar Scalar
Represents an (unsigned) cell in a cellular grid space by its Khalimsky coordinates.
VectorField< Self, duality > sharp(const KForm< Self, 1, duality > &one_form) const
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
SCell getSCell(const Order &order, const Duality &duality, const Index &index) const