DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::Measure< TSet > Class Template Reference

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

#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
 grid resolution parameter. More...
 
Set::Size mySetSize
 Copy of the set size. More...
 
double myIsInitBefore
 Boolean to assert that the init() was called before the eval(). More...
 

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

◆ Domain

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

Definition at line 77 of file Measure.h.

◆ Quantity

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

Definition at line 82 of file Measure.h.

◆ Set

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

Definition at line 76 of file Measure.h.

Constructor & Destructor Documentation

◆ Measure() [1/2]

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

Constructor.

◆ ~Measure()

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

Destructor.

◆ Measure() [2/2]

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

◆ eval()

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.

◆ init()

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.

◆ isValid()

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.

◆ operator=()

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.

◆ selfDisplay()

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

◆ myH

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

grid resolution parameter.

Definition at line 156 of file Measure.h.

◆ myIsInitBefore

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.

◆ mySetSize

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: