DGtal  0.9.3beta
Public Types | Public Member Functions | Data Fields | Protected Member Functions
DGtal::VectorField< TCalculus, duality > Class Template Reference

#include <DGtal/dec/VectorField.h>

Public Types

typedef TCalculus Calculus
 
typedef Calculus::Scalar Scalar
 
typedef Calculus::SCell SCell
 
typedef Calculus::Index Index
 
typedef DGtal::PointVector< Calculus::dimensionAmbient, ScalarVector
 
typedef Calculus::DenseMatrix Coordinates
 
typedef Coordinates Container
 

Public Member Functions

 VectorField (ConstAlias< Calculus > calculus)
 
 VectorField (ConstAlias< Calculus > calculus, const Container &container)
 
VectorFieldoperator= (const VectorField &other)
 
SCell getSCell (const Index &index) const
 
Index length () const
 
Vector getVector (const Index &index) const
 
void setVector (const Index &index, const Vector &vector)
 
void selfDisplay (std::ostream &out) const
 
std::string className () const
 
KForm< Calculus, 0, duality > coordAlongDirection (const Dimension &dir) const
 
KForm< Calculus, 0, duality > intensity (const typename Vector::NormType norm_type=Vector::L_2) const
 
void clear ()
 
VectorField< TCalculus, duality > normalized (const Scalar &epsilon=0) const
 
bool isValid () const
 

Data Fields

Coordinates myCoordinates
 
const CalculusmyCalculus
 

Protected Member Functions

 VectorField ()
 

Detailed Description

template<typename TCalculus, Duality duality>
class DGtal::VectorField< TCalculus, duality >

Aim: VectorField represents a discrete vector field in the dec package. Vector field values are attached to 0-cells with the same duality as the vector field.

Description of template class 'VectorField'

Template Parameters
TCalculusshould be DiscreteExteriorCalculus.
dualityis the duality of the vector field.

Definition at line 66 of file VectorField.h.

Member Typedef Documentation

template<typename TCalculus, Duality duality>
typedef TCalculus DGtal::VectorField< TCalculus, duality >::Calculus

Definition at line 70 of file VectorField.h.

template<typename TCalculus, Duality duality>
typedef Coordinates DGtal::VectorField< TCalculus, duality >::Container

Definition at line 78 of file VectorField.h.

template<typename TCalculus, Duality duality>
typedef Calculus::DenseMatrix DGtal::VectorField< TCalculus, duality >::Coordinates

Definition at line 77 of file VectorField.h.

template<typename TCalculus, Duality duality>
typedef Calculus::Index DGtal::VectorField< TCalculus, duality >::Index

Definition at line 74 of file VectorField.h.

template<typename TCalculus, Duality duality>
typedef Calculus::Scalar DGtal::VectorField< TCalculus, duality >::Scalar

Definition at line 72 of file VectorField.h.

template<typename TCalculus, Duality duality>
typedef Calculus::SCell DGtal::VectorField< TCalculus, duality >::SCell

Definition at line 73 of file VectorField.h.

template<typename TCalculus, Duality duality>
typedef DGtal::PointVector<Calculus::dimensionAmbient, Scalar> DGtal::VectorField< TCalculus, duality >::Vector

Definition at line 75 of file VectorField.h.

Constructor & Destructor Documentation

template<typename TCalculus, Duality duality>
DGtal::VectorField< TCalculus, duality >::VectorField ( ConstAlias< Calculus calculus)

Constructor.

Parameters
calculusthe discrete exterior calculus to use.
template<typename TCalculus, Duality duality>
DGtal::VectorField< TCalculus, duality >::VectorField ( ConstAlias< Calculus calculus,
const Container container 
)

Constructor.

Parameters
calculusthe discrete exterior calculus to use.
containerthe container to copy.
template<typename TCalculus, Duality duality>
DGtal::VectorField< TCalculus, duality >::VectorField ( )
protected

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

Member Function Documentation

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

Get class name string "VectorField".

template<typename TCalculus, Duality duality>
void DGtal::VectorField< TCalculus, duality >::clear ( )

Clear current vector field.

template<typename TCalculus, Duality duality>
KForm<Calculus, 0, duality> DGtal::VectorField< TCalculus, duality >::coordAlongDirection ( const Dimension dir) const

Create zero form by projecting the vector field along basis vector.

Parameters
dirdirection along wich the vector field is projected.
template<typename TCalculus, Duality duality>
SCell DGtal::VectorField< TCalculus, duality >::getSCell ( const Index index) const

Get signed k-cell from index.

Parameters
indexthe index.
Returns
associated Khalimsky cell.
template<typename TCalculus, Duality duality>
Vector DGtal::VectorField< TCalculus, duality >::getVector ( const Index index) const

Get vector from index.

Parameters
indexof the corresponding 0-cell.
template<typename TCalculus, Duality duality>
KForm<Calculus, 0, duality> DGtal::VectorField< TCalculus, duality >::intensity ( const typename Vector::NormType  norm_type = Vector::L_2) const

Create zero from with field intensity.

Parameters
norm_typenorm type.
template<typename TCalculus, Duality duality>
bool DGtal::VectorField< TCalculus, duality >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TCalculus, Duality duality>
Index DGtal::VectorField< TCalculus, duality >::length ( ) const

Get k-form length.

Returns
k-form length.
template<typename TCalculus, Duality duality>
VectorField<TCalculus, duality> DGtal::VectorField< TCalculus, duality >::normalized ( const Scalar epsilon = 0) const

Return the normalized vector field. Scale vector field to norm 1 at each point.

Parameters
epsilonvectors with norm lower than epsilon are set to zero.
template<typename TCalculus, Duality duality>
VectorField& DGtal::VectorField< TCalculus, duality >::operator= ( const VectorField< TCalculus, duality > &  other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.
template<typename TCalculus, Duality duality>
void DGtal::VectorField< TCalculus, 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, Duality duality>
void DGtal::VectorField< TCalculus, duality >::setVector ( const Index index,
const Vector vector 
)

Set vector at index.

Parameters
indexof the corresponding 0-cell.
vectorvalue of the vector field to set at this index.

Field Documentation

template<typename TCalculus, Duality duality>
const Calculus* DGtal::VectorField< TCalculus, duality >::myCalculus

Pointer to const calculus.

Definition at line 137 of file VectorField.h.

template<typename TCalculus, Duality duality>
Coordinates DGtal::VectorField< TCalculus, duality >::myCoordinates

Container used to actually hold the kform data.

Definition at line 132 of file VectorField.h.


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