DGtal 1.4.0
|
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, Scalar > | Vector |
typedef Calculus::DenseMatrix | Coordinates |
typedef Coordinates | Container |
Public Member Functions | |
VectorField (ConstAlias< Calculus > calculus) | |
VectorField (ConstAlias< Calculus > calculus, const Container &container) | |
VectorField & | operator= (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 Calculus * | myCalculus |
Protected Member Functions | |
VectorField () | |
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'
TCalculus | should be DiscreteExteriorCalculus. |
duality | is the duality of the vector field. |
Definition at line 67 of file VectorField.h.
typedef TCalculus DGtal::VectorField< TCalculus, duality >::Calculus |
Definition at line 71 of file VectorField.h.
typedef Coordinates DGtal::VectorField< TCalculus, duality >::Container |
Definition at line 79 of file VectorField.h.
typedef Calculus::DenseMatrix DGtal::VectorField< TCalculus, duality >::Coordinates |
Definition at line 78 of file VectorField.h.
typedef Calculus::Index DGtal::VectorField< TCalculus, duality >::Index |
Definition at line 75 of file VectorField.h.
typedef Calculus::Scalar DGtal::VectorField< TCalculus, duality >::Scalar |
Definition at line 73 of file VectorField.h.
typedef Calculus::SCell DGtal::VectorField< TCalculus, duality >::SCell |
Definition at line 74 of file VectorField.h.
typedef DGtal::PointVector<Calculus::dimensionAmbient, Scalar> DGtal::VectorField< TCalculus, duality >::Vector |
Definition at line 76 of file VectorField.h.
DGtal::VectorField< TCalculus, duality >::VectorField | ( | ConstAlias< Calculus > | calculus | ) |
Constructor.
calculus | the discrete exterior calculus to use. |
DGtal::VectorField< TCalculus, duality >::VectorField | ( | ConstAlias< Calculus > | calculus, |
const Container & | container ) |
Constructor.
calculus | the discrete exterior calculus to use. |
container | the container to copy. |
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
std::string DGtal::VectorField< TCalculus, duality >::className | ( | ) | const |
Get class name string "VectorField".
void DGtal::VectorField< TCalculus, duality >::clear | ( | ) |
Clear current vector field.
KForm< Calculus, 0, duality > DGtal::VectorField< TCalculus, duality >::coordAlongDirection | ( | const Dimension & | dir | ) | const |
Create zero form by projecting the vector field along basis vector.
dir | direction along wich the vector field is projected. |
SCell DGtal::VectorField< TCalculus, duality >::getSCell | ( | const Index & | index | ) | const |
Get signed k-cell from index.
index | the index. |
Vector DGtal::VectorField< TCalculus, duality >::getVector | ( | const Index & | index | ) | const |
Get vector from index.
index | of the corresponding 0-cell. |
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.
norm_type | norm type. |
bool DGtal::VectorField< TCalculus, duality >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Index DGtal::VectorField< TCalculus, duality >::length | ( | ) | const |
Get k-form length.
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.
epsilon | vectors with norm lower than epsilon are set to zero. |
VectorField & DGtal::VectorField< TCalculus, duality >::operator= | ( | const VectorField< TCalculus, duality > & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::VectorField< TCalculus, duality >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::VectorField< TCalculus, duality >::setVector | ( | const Index & | index, |
const Vector & | vector ) |
Set vector at index.
index | of the corresponding 0-cell. |
vector | value of the vector field to set at this index. |
const Calculus* DGtal::VectorField< TCalculus, duality >::myCalculus |
Pointer to const calculus.
Definition at line 138 of file VectorField.h.
Coordinates DGtal::VectorField< TCalculus, duality >::myCoordinates |
Container used to actually hold the kform data.
Definition at line 133 of file VectorField.h.