31#if defined(DiscreteExteriorCalculus_RECURSES)
32#error Recursive header files inclusion detected in DiscreteExteriorCalculus.h
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>
70 class DiscreteExteriorCalculusFactory;
77 template <Dimension dim,
typename TInteger>
96 template <Dimension dimEmbedded, Dimension dimAmbient,
typename TLinearAlgebraBackend,
typename TInteger = DGtal::
int32_t>
107 typedef typename LinearAlgebraBackend::DenseVector::Index
Index;
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"
635#undef DiscreteExteriorCalculus_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: This class provides static members to create DEC structures from various other DGtal structures.
Aim: DiscreteExteriorCalculus represents a calculus in the dec package. This is the main structure in...
LinearOperator< Self, 2, DUAL, dimEmbedded-2, PRIMAL > DualHodge2
void selfDisplay(std::ostream &out) const
LinearOperator< Self, 0, PRIMAL, dimEmbedded-0, DUAL > PrimalHodge0
std::string className() const
const Properties & getProperties() const
Properties::const_iterator ConstIterator
KForm< Self, 1, duality > flat(const VectorField< Self, duality > &vector_field) const
LinearOperator< Self, 0, duality, 1, duality > flatDirectional(const Dimension &dir) const
ConstIterator begin() const
LinearAlgebraBackend::DenseMatrix DenseMatrix
BOOST_CONCEPT_ASSERT((concepts::CLinearAlgebra< DenseVector, DenseMatrix >))
BOOST_STATIC_CONSTANT(Dimension, dimensionAmbient=dimAmbient)
BOOST_CONCEPT_ASSERT((concepts::CDynamicMatrix< SparseMatrix >))
LinearOperator< Self, 3, PRIMAL, 2, PRIMAL > PrimalAntiderivative3
LinearOperator< Self, 1, duality, 0, duality > sharpDirectional(const Dimension &dir) const
LinearAlgebraBackend::DenseVector::Scalar Scalar
KForm< Self, 2, PRIMAL > PrimalForm2
LinearOperator< Self, 1, DUAL, 2, DUAL > DualDerivative1
LinearOperator< Self, 3, PRIMAL, 3, PRIMAL > PrimalIdentity3
LinearOperator< Self, order, duality, dimEmbedded-order, OppositeDuality< duality >::duality > hodge() const
LinearOperator< Self, 3, DUAL, 3, DUAL > DualIdentity3
BOOST_STATIC_ASSERT((dimAmbient >=dimEmbedded))
LinearOperator< Self, 2, PRIMAL, 3, PRIMAL > PrimalDerivative2
KForm< Self, 0, DUAL > DualForm0
LinearOperator< Self, 2, DUAL, 1, DUAL > DualAntiderivative2
DGtal::KhalimskySpaceND< dimAmbient, TInteger > KSpace
BOOST_STATIC_ASSERT((boost::is_same< Dimension, Order >::value))
LinearOperator< Self, 1, PRIMAL, 1, PRIMAL > PrimalIdentity1
Dimension edgeDirection(const Cell &cell, const Duality &duality) const
void updateFlatOperator()
LinearOperator< Self, 0, duality, 0, duality > heatLaplace(const typename DenseVector::Scalar &h, const typename DenseVector::Scalar &t, const typename DenseVector::Scalar &K) const
DiscreteExteriorCalculus()
void updateCachedOperators()
void initKSpace(ConstAlias< TDomain > domain)
LinearOperator< Self, 0, PRIMAL, 0, PRIMAL > PrimalIdentity0
KForm< Self, 1, DUAL > DualForm1
LinearOperator< Self, 3, DUAL, dimEmbedded-3, PRIMAL > DualHodge3
Index getCellIndex(const Cell &cell) const
LinearOperator< Self, 2, DUAL, 2, DUAL > DualIdentity2
SCell getSCell(const Order &order, const Duality &duality, const Index &index) const
BOOST_STATIC_CONSTANT(Dimension, dimensionEmbedded=dimEmbedded)
LinearOperator< Self, order, duality, order-1, duality > antiderivative() const
IndexedSCells myIndexSignedCells
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
LinearOperator< Self, 2, PRIMAL, 1, PRIMAL > PrimalAntiderivative2
boost::array< SCells, dimEmbedded+1 > IndexedSCells
LinearOperator< Self, 1, PRIMAL, 0, PRIMAL > PrimalAntiderivative1
KForm< Self, 3, PRIMAL > PrimalForm3
KForm< Self, 2, DUAL > DualForm2
LinearAlgebraBackend::SparseMatrix SparseMatrix
LinearOperator< Self, 1, DUAL, dimEmbedded-1, PRIMAL > DualHodge1
Properties myCellProperties
Index kFormLength(const Order &order, const Duality &duality) const
bool eraseCell(const Cell &cell)
LinearAlgebraBackend::DenseVector DenseVector
bool insertSCell(const SCell &signed_cell)
boost::array< boost::array< SparseMatrix, dimAmbient >, 2 > mySharpOperatorMatrixes
void updateSharpOperator()
KForm< Self, 0, PRIMAL > PrimalForm0
DiscreteExteriorCalculus< dimEmbedded, dimAmbient, TLinearAlgebraBackend, TInteger > Self
bool isCellFlipped(const Cell &cell) const
bool myCachedOperatorsNeedUpdate
KForm< Self, 3, DUAL > DualForm3
LinearOperator< Self, 1, DUAL, 1, DUAL > DualIdentity1
LinearOperator< Self, 2, PRIMAL, 2, PRIMAL > PrimalIdentity2
Properties::iterator Iterator
LinearOperator< Self, 1, PRIMAL, dimEmbedded-1, DUAL > PrimalHodge1
BOOST_CONCEPT_ASSERT((concepts::CDynamicVector< DenseVector >))
LinearOperator< Self, order, duality, order, duality > identity() const
LinearAlgebraBackend::DenseVector::Index Index
LinearOperator< Self, 1, DUAL, 0, DUAL > DualAntiderivative1
LinearOperator< Self, order, duality, order+1, duality > derivative() const
boost::unordered_map< Cell, Property > Properties
LinearOperator< Self, 0, DUAL, dimEmbedded-0, PRIMAL > DualHodge0
LinearOperator< Self, 3, PRIMAL, dimEmbedded-3, DUAL > PrimalHodge3
LinearOperator< Self, 2, PRIMAL, dimEmbedded-2, DUAL > PrimalHodge2
TLinearAlgebraBackend LinearAlgebraBackend
VectorField< Self, DUAL > DualVectorField
LinearOperator< Self, 2, DUAL, 3, DUAL > DualDerivative2
Scalar hodgeSign(const Cell &cell, const Duality &duality) const
LinearOperator< Self, 0, DUAL, 0, DUAL > DualIdentity0
bool insertSCell(const SCell &signed_cell, const Scalar &primal_size, const Scalar &dual_size)
const SCells & getIndexedSCells() const
LinearOperator< Self, order, duality, order, duality > reorder(const TConstIterator &begin_range, const TConstIterator &end_range) const
BOOST_CONCEPT_ASSERT((concepts::CDynamicMatrix< DenseMatrix >))
std::vector< SCell > SCells
Order actualOrder(const Order &order, const Duality &duality) const
LinearOperator< Self, 3, DUAL, 2, DUAL > DualAntiderivative3
LinearOperator< Self, 0, PRIMAL, 1, PRIMAL > PrimalDerivative0
VectorField< Self, duality > sharp(const KForm< Self, 1, duality > &one_form) const
LinearOperator< Self, 0, duality, 0, duality > laplace() const
boost::array< boost::array< SparseMatrix, dimAmbient >, 2 > myFlatOperatorMatrixes
LinearOperator< Self, 1, PRIMAL, 2, PRIMAL > PrimalDerivative1
KForm< Self, 1, PRIMAL > PrimalForm1
ConstIterator end() const
LinearOperator< Self, 0, DUAL, 1, DUAL > DualDerivative0
BOOST_CONCEPT_ASSERT((concepts::CLinearAlgebra< DenseVector, SparseMatrix >))
bool containsCell(const Cell &cell) const
VectorField< Self, PRIMAL > PrimalVectorField
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
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...
DGtal is the top-level namespace which contains all DGtal functions and types.
unsigned int Order
Aim: Order is used as template parameter for DEC classes.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
size_t hash_value(const KhalimskyCell< dim, TInteger > &cell)
DGtal::uint32_t Dimension
Duality
Aim: Duality enumerator tells if templated object lives in primal or dual space. Used as template par...
Holds size 'primal_size', 'dual_size', 'index' and 'flipped' for each cell of the DEC object....
Represents an (unsigned) cell in a cellular grid space by its Khalimsky coordinates.
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Aim: Represent any dynamic sized matrix having sparse or dense representation.
Aim: Represent any dynamic sized column vector having sparse or dense representation.
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Aim: Check right multiplication between matrix and vector and internal matrix multiplication....