DGtal  0.9.4beta
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions
DGtal::KForm< TCalculus, order, duality > Class Template Reference

#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

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

Definition at line 69 of file KForm.h.

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

Definition at line 74 of file KForm.h.

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

Definition at line 77 of file KForm.h.

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

Definition at line 75 of file KForm.h.

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

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

Constructor.

Parameters
calculusthe discrete exterior calculus to use.
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.
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

template<typename TCalculus, Order order, Duality duality>
DGtal::KForm< TCalculus, order, duality >::BOOST_STATIC_ASSERT ( (order >=0)  )
template<typename TCalculus, Order order, Duality duality>
DGtal::KForm< TCalculus, order, duality >::BOOST_STATIC_ASSERT ( (order<=Calculus::dimensionEmbedded)  )
template<typename TCalculus, Order order, Duality duality>
std::string DGtal::KForm< TCalculus, order, duality >::className ( ) const

Get class name string "KForm".

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

Clear current k-form.

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.
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.
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.
template<typename TCalculus, Order order, Duality duality>
Index DGtal::KForm< TCalculus, order, duality >::length ( ) const

Get k-form length.

Returns
k-form length.
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.
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'.
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.
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.

Field Documentation

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.

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

Container used to actually hold the kform data.

Definition at line 131 of file KForm.h.


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