DGtal  1.4.beta
DGtal::VectorField< TCalculus, duality > Class Template Reference

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. More...

#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

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
 TCalculus should be DiscreteExteriorCalculus. duality is the duality of the vector field.

Definition at line 67 of file VectorField.h.

## ◆ Calculus

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

Definition at line 71 of file VectorField.h.

## ◆ Container

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

Definition at line 79 of file VectorField.h.

## ◆ Coordinates

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

Definition at line 78 of file VectorField.h.

## ◆ Index

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

Definition at line 75 of file VectorField.h.

## ◆ Scalar

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

Definition at line 73 of file VectorField.h.

## ◆ SCell

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

Definition at line 74 of file VectorField.h.

## ◆ Vector

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

Definition at line 76 of file VectorField.h.

## ◆ VectorField() [1/3]

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

Constructor.

Parameters
 calculus the discrete exterior calculus to use.

## ◆ VectorField() [2/3]

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

Constructor.

Parameters
 calculus the discrete exterior calculus to use. container the container to copy.

## ◆ VectorField() [3/3]

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

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

## ◆ className()

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

Get class name string "VectorField".

## ◆ clear()

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

Clear current vector field.

## ◆ coordAlongDirection()

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

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

Parameters
 dir direction along wich the vector field is projected.

## ◆ getSCell()

template<typename TCalculus , Duality duality>
 SCell DGtal::VectorField< TCalculus, duality >::getSCell ( const Index & index ) const

Get signed k-cell from index.

Parameters
 index the index.
Returns
associated Khalimsky cell.

## ◆ getVector()

template<typename TCalculus , Duality duality>
 Vector DGtal::VectorField< TCalculus, duality >::getVector ( const Index & index ) const

Get vector from index.

Parameters
 index of the corresponding 0-cell.

## ◆ intensity()

template<typename TCalculus , Duality duality>
 KForm DGtal::VectorField< TCalculus, duality >::intensity ( const typename Vector::NormType norm_type = Vector::L_2 ) const

Create zero from with field intensity.

Parameters
 norm_type norm type.

## ◆ isValid()

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.

## ◆ length()

template<typename TCalculus , Duality duality>
 Index DGtal::VectorField< TCalculus, duality >::length ( ) const

Get k-form length.

Returns
k-form length.

## ◆ normalized()

template<typename TCalculus , Duality duality>
 VectorField 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
 epsilon vectors with norm lower than epsilon are set to zero.

## ◆ operator=()

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

Assignment.

Parameters
 other the object to copy.
Returns
a reference on 'this'.

## ◆ selfDisplay()

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

Writes/Displays the object on an output stream.

Parameters
 out the output stream where the object is written.

## ◆ setVector()

template<typename TCalculus , Duality duality>
 void DGtal::VectorField< TCalculus, duality >::setVector ( const Index & index, const Vector & vector )

Set vector at index.

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

## ◆ myCalculus

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

Pointer to const calculus.

Definition at line 138 of file VectorField.h.

## ◆ myCoordinates

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

Container used to actually hold the kform data.

Definition at line 133 of file VectorField.h.

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