DGtal  0.9.4beta
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::Measure< TSet > Class Template Reference

#include <DGtal/geometry/volumes/estimation/Measure.h>

Public Types

typedef TSet Set
 
typedef TSet::Domain Domain
 
typedef double Quantity
 

Public Member Functions

 Measure ()
 
 ~Measure ()
 
void init (const double h, const Set &aSetPointer)
 
Quantity eval () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

 Measure (const Measure &other)
 
Measureoperator= (const Measure &other)
 

Private Attributes

double myH
 
Set::Size mySetSize
 
double myIsInitBefore
 

Detailed Description

template<typename TSet>
class DGtal::Measure< TSet >

Aim: Implements a simple measure computation (in the Lesbegue sens) of a set. In dimension 2, it corresponds to the area of the set, to the volume in dimension 3,...

Description of template class 'Measure'

Model of CGlobalGeometricEstimator

Template Parameters
TSettype of set on which the geometrical moments is computed.

Definition at line 71 of file Measure.h.

Member Typedef Documentation

template<typename TSet>
typedef TSet::Domain DGtal::Measure< TSet >::Domain

Definition at line 77 of file Measure.h.

template<typename TSet>
typedef double DGtal::Measure< TSet >::Quantity

Definition at line 82 of file Measure.h.

template<typename TSet>
typedef TSet DGtal::Measure< TSet >::Set

Definition at line 76 of file Measure.h.

Constructor & Destructor Documentation

template<typename TSet>
DGtal::Measure< TSet >::Measure ( )

Constructor.

template<typename TSet>
DGtal::Measure< TSet >::~Measure ( )

Destructor.

template<typename TSet>
DGtal::Measure< TSet >::Measure ( const Measure< TSet > &  other)
private

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.

Member Function Documentation

template<typename TSet>
Quantity DGtal::Measure< TSet >::eval ( ) const

Compute the measure (area, volume) of the set. Since we rely on the Set::size() method which is O(1). The current method is O(1) too.

Precondition
init method must have been called before.
Returns
the measure of the set.
template<typename TSet>
void DGtal::Measure< TSet >::init ( const double  h,
const Set aSetPointer 
)

Initialize the measure computation.

Parameters
hgrid size (must be >0).
aSetPointera pointer to an input set.
template<typename TSet>
bool DGtal::Measure< TSet >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TSet>
Measure& DGtal::Measure< TSet >::operator= ( const Measure< TSet > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TSet>
void DGtal::Measure< TSet >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

template<typename TSet>
double DGtal::Measure< TSet >::myH
private

grid resolution parameter.

Definition at line 156 of file Measure.h.

template<typename TSet>
double DGtal::Measure< TSet >::myIsInitBefore
private

Boolean to assert that the init() was called before the eval().

Definition at line 162 of file Measure.h.

template<typename TSet>
Set::Size DGtal::Measure< TSet >::mySetSize
private

Copy of the set size.

Definition at line 159 of file Measure.h.


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