DGtal  1.5.beta
DGtal::KForm< TCalculus, order, duality > Class Template Reference

Aim: KForm represents discrete kforms in the dec package. More...

#include <DGtal/dec/KForm.h>

Public Types

typedef TCalculus Calculus
 
typedef Calculus::DenseVector Container
 
typedef Calculus::Scalar Scalar
 
typedef Calculus::SCell SCell
 
typedef Calculus::Index Index
 

Public Member Functions

 BOOST_STATIC_ASSERT ((order >=0))
 
 BOOST_STATIC_ASSERT ((order<=Calculus::dimensionEmbedded))
 
 KForm (ConstAlias< Calculus > calculus)
 
 KForm (ConstAlias< Calculus > calculus, const Container &container)
 
KFormoperator= (const KForm &other)
 
void selfDisplay (std::ostream &out) const
 
std::string className () const
 
void clear ()
 
SCell getSCell (const Index &index) const
 
Index length () const
 
bool isValid () const
 

Static Public Member Functions

static KForm< TCalculus, order, duality > ones (ConstAlias< Calculus > calculus)
 
static KForm< TCalculus, order, duality > zeros (ConstAlias< Calculus > calculus)
 
static KForm< TCalculus, order, duality > dirac (ConstAlias< Calculus > calculus, const typename Calculus::Cell &cell)
 

Data Fields

Container myContainer
 
const CalculusmyCalculus
 

Protected Member Functions

 KForm ()
 

Detailed Description

template<typename TCalculus, Order order, Duality duality>
class DGtal::KForm< TCalculus, order, duality >

Aim: KForm represents discrete kforms in the dec package.

Description of template class 'KForm'

Template Parameters
TCalculusshould be DiscreteExteriorCalculus.
orderis the order of the kform.
dualityis the duality of the kform.

Definition at line 65 of file KForm.h.

Member Typedef Documentation

◆ Calculus

template<typename TCalculus , Order order, Duality duality>
typedef TCalculus DGtal::KForm< TCalculus, order, duality >::Calculus

Definition at line 69 of file KForm.h.

◆ Container

template<typename TCalculus , Order order, Duality duality>
typedef Calculus::DenseVector DGtal::KForm< TCalculus, order, duality >::Container

Definition at line 74 of file KForm.h.

◆ Index

template<typename TCalculus , Order order, Duality duality>
typedef Calculus::Index DGtal::KForm< TCalculus, order, duality >::Index

Definition at line 77 of file KForm.h.

◆ Scalar

template<typename TCalculus , Order order, Duality duality>
typedef Calculus::Scalar DGtal::KForm< TCalculus, order, duality >::Scalar

Definition at line 75 of file KForm.h.

◆ SCell

template<typename TCalculus , Order order, Duality duality>
typedef Calculus::SCell DGtal::KForm< TCalculus, order, duality >::SCell

Definition at line 76 of file KForm.h.

Constructor & Destructor Documentation

◆ KForm() [1/3]

template<typename TCalculus , Order order, Duality duality>
DGtal::KForm< TCalculus, order, duality >::KForm ( ConstAlias< Calculus calculus)

Constructor.

Parameters
calculusthe discrete exterior calculus to use.

◆ KForm() [2/3]

template<typename TCalculus , Order order, Duality duality>
DGtal::KForm< TCalculus, order, duality >::KForm ( ConstAlias< Calculus calculus,
const Container container 
)

Constructor.

Parameters
calculusthe discrete exterior calculus to use.
containerthe container to copy.

◆ KForm() [3/3]

template<typename TCalculus , Order order, Duality duality>
DGtal::KForm< TCalculus, order, duality >::KForm ( )
protected

Constructor. Forbidden by default (protected to avoid g++ warnings).

Member Function Documentation

◆ BOOST_STATIC_ASSERT() [1/2]

template<typename TCalculus , Order order, Duality duality>
DGtal::KForm< TCalculus, order, duality >::BOOST_STATIC_ASSERT ( (order >=0)  )

◆ BOOST_STATIC_ASSERT() [2/2]

template<typename TCalculus , Order order, Duality duality>
DGtal::KForm< TCalculus, order, duality >::BOOST_STATIC_ASSERT ( (order<=Calculus::dimensionEmbedded)  )

◆ className()

template<typename TCalculus , Order order, Duality duality>
std::string DGtal::KForm< TCalculus, order, duality >::className ( ) const

Get class name string "KForm".

◆ clear()

template<typename TCalculus , Order order, Duality duality>
void DGtal::KForm< TCalculus, order, duality >::clear ( )

Clear current k-form.

◆ dirac()

template<typename TCalculus , Order order, Duality duality>
static KForm<TCalculus, order, duality> DGtal::KForm< TCalculus, order, duality >::dirac ( ConstAlias< Calculus calculus,
const typename Calculus::Cell cell 
)
static

Create a kform with all values initialized to 0, except value associated with cell initialized to 1.

Parameters
calculusthe discrete exterior calculus to use.
cellDirac position.

◆ getSCell()

template<typename TCalculus , Order order, Duality duality>
SCell DGtal::KForm< TCalculus, order, duality >::getSCell ( const Index index) const

Get signed k-cell from index.

Parameters
indexthe index.
Returns
associated Khalimsky cell.

◆ isValid()

template<typename TCalculus , Order order, Duality duality>
bool DGtal::KForm< TCalculus, order, duality >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ length()

template<typename TCalculus , Order order, Duality duality>
Index DGtal::KForm< TCalculus, order, duality >::length ( ) const

Get k-form length.

Returns
k-form length.

Referenced by DGtal::dec_helper::diagonal().

◆ ones()

template<typename TCalculus , Order order, Duality duality>
static KForm<TCalculus, order, duality> DGtal::KForm< TCalculus, order, duality >::ones ( ConstAlias< Calculus calculus)
static

Create a kform with all values initialized to 1.

Parameters
calculusthe discrete exterior calculus to use.

Referenced by DGtal::ATSolver2D< TKSpace, TLinearAlgebra >::initInputScalarFieldU2(), DGtal::ATSolver2D< TKSpace, TLinearAlgebra >::initInputVectorFieldU2(), and DGtal::ATSolver2D< TKSpace, TLinearAlgebra >::setEpsilon().

◆ operator=()

template<typename TCalculus , Order order, Duality duality>
KForm& DGtal::KForm< TCalculus, order, duality >::operator= ( const KForm< TCalculus, order, duality > &  other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ selfDisplay()

template<typename TCalculus , Order order, Duality duality>
void DGtal::KForm< TCalculus, order, duality >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ zeros()

template<typename TCalculus , Order order, Duality duality>
static KForm<TCalculus, order, duality> DGtal::KForm< TCalculus, order, duality >::zeros ( ConstAlias< Calculus calculus)
static

Create a kform with all values initialized to 0. Convenience wrapper for default constructor.

Parameters
calculusthe discrete exterior calculus to use.

Referenced by DGtal::ATSolver2D< TKSpace, TLinearAlgebra >::solveOneAlternateStep().

Field Documentation

◆ myCalculus

template<typename TCalculus , Order order, Duality duality>
const Calculus* DGtal::KForm< TCalculus, order, duality >::myCalculus

Pointer to const calculus.

Definition at line 136 of file KForm.h.

Referenced by DGtal::dec_helper::diagonal().

◆ myContainer

template<typename TCalculus , Order order, Duality duality>
Container DGtal::KForm< TCalculus, order, duality >::myContainer

The documentation for this class was generated from the following file: