DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor > Class Template Reference

#include <TrueGlobalEstimatorOnPoints.h>

Collaboration diagram for DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >:
Collaboration graph
[legend]

Public Types

typedef TConstIteratorOnPoints ConstIteratorOnPoints
typedef TParametricShape ParametricShape
typedef ParametricShape::RealPoint RealPoint
typedef TParametricShapeFunctor ParametricShapeFunctor
typedef
ParametricShapeFunctor::Quantity 
Quantity

Public Member Functions

 TrueGlobalEstimatorOnPoints ()
 TrueGlobalEstimatorOnPoints (const double h, const ConstIteratorOnPoints &itb, const ConstIteratorOnPoints &ite, ParametricShape *aShape, const bool &isClosed)
 ~TrueGlobalEstimatorOnPoints ()
void init (const double h, const ConstIteratorOnPoints &itb, const ConstIteratorOnPoints &ite, ParametricShape *aShape, const bool &isClosed)
Quantity eval ()
Quantity eval (const ConstIteratorOnPoints &itb, const ConstIteratorOnPoints &ite)
bool isValid () const

Private Member Functions

 TrueGlobalEstimatorOnPoints (const TrueGlobalEstimatorOnPoints &other)
TrueGlobalEstimatorOnPointsoperator= (const TrueGlobalEstimatorOnPoints &other)

Private Attributes

double myH
bool myFlagIsClosed
bool myFlagIsInit
ParametricShapeFunctor myFunctor
ConstIteratorOnPoints myBegin
ConstIteratorOnPoints myEnd

Detailed Description

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
class DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >

Aim: Computes the true quantity to each element of a range associated to a parametric shape.

Description of template class 'TrueGlobalEstimatorOnPoints'

Template Parameters:
TConstIteratorOnPointstype of iterator on points used as query points.
TParametricShapetype of the parametric shape.
TParametricShapeFunctortype of Functor used to evaluate the quantity.

Definition at line 69 of file TrueGlobalEstimatorOnPoints.h.


Member Typedef Documentation

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
typedef TConstIteratorOnPoints DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::ConstIteratorOnPoints

Definition at line 75 of file TrueGlobalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
typedef TParametricShape DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::ParametricShape

Definition at line 77 of file TrueGlobalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
typedef TParametricShapeFunctor DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::ParametricShapeFunctor

Definition at line 80 of file TrueGlobalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
typedef ParametricShapeFunctor::Quantity DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::Quantity

Definition at line 81 of file TrueGlobalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
typedef ParametricShape::RealPoint DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::RealPoint

Definition at line 78 of file TrueGlobalEstimatorOnPoints.h.


Constructor & Destructor Documentation

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::TrueGlobalEstimatorOnPoints ( )
inline
template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::TrueGlobalEstimatorOnPoints ( const double  h,
const ConstIteratorOnPoints itb,
const ConstIteratorOnPoints ite,
ParametricShape aShape,
const bool &  isClosed 
)

Constructor.

Parameters:
hgrid size (must be >0).
itb,beginiterator
ite,enditerator
aSegmentComputer
isClosedtrue if the input range is closed.
template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::~TrueGlobalEstimatorOnPoints ( )
inline

Destructor.

Definition at line 112 of file TrueGlobalEstimatorOnPoints.h.

{};
template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::TrueGlobalEstimatorOnPoints ( const TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor > &  other)
private

Copy constructor.

Parameters:
otherthe object to clone. Forbidden by default.

Member Function Documentation

template<typename CIt , typename PShape , typename PShapeFunctor >
DGtal::TrueGlobalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::Quantity DGtal::TrueGlobalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::eval ( )
inline
Returns:
the estimated quantity
the estimated quantity at *it from itb till ite

Definition at line 87 of file TrueGlobalEstimatorOnPoints.ih.

{
ASSERT(myH>0);
return myFunctor();
} else {
//get the first and last points
for ( ; j != myEnd ; ++i, ++j) {}
//myH is the coordinates unit
RealPoint p( *myBegin );
p *= myH;
RealPoint p2( *i );
p2 *= myH;
return myFunctor(p,p2);
}
}
template<typename CIt , typename PShape , typename PShapeFunctor >
DGtal::TrueGlobalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::Quantity DGtal::TrueGlobalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::eval ( const ConstIteratorOnPoints itb,
const ConstIteratorOnPoints ite 
)
inline
Returns:
the estimated quantity from itb till ite (exculded)
the estimated quantity at *it

Definition at line 113 of file TrueGlobalEstimatorOnPoints.ih.

{
ASSERT(myH>0);
return myFunctor();
} else {
//get the first and last points
for ( ; j != ite; ++i, ++j) {};
//myH is the coordinates unit
RealPoint p( *itb );
p *= myH;
RealPoint p2( *i );
p2 *= myH;
return myFunctor(p,p2);
}
}
template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
void DGtal::TrueGlobalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::init ( const double  h,
const ConstIteratorOnPoints itb,
const ConstIteratorOnPoints ite,
ParametricShape aShape,
const bool &  isClosed 
)
inline

Initialisation.

Parameters:
hgrid size (must be >0).
itb,beginiterator
ite,enditerator
aSegmentComputer
isClosedtrue if the input range is viewed as closed.

Init.

Definition at line 62 of file TrueGlobalEstimatorOnPoints.ih.

{
myH = h;
myBegin = itb;
myEnd = ite;
myFlagIsClosed = isClosed;
myFlagIsInit = true;
}
template<typename CIt , typename PShape , typename PShapeFunctor >
bool DGtal::TrueGlobalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::isValid ( ) const
inline

Checks the validity/consistency of the object.

Returns:
'true' if the object is valid, 'false' otherwise.

Definition at line 141 of file TrueGlobalEstimatorOnPoints.ih.

{
return myFlagIsInit;
}
template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
TrueGlobalEstimatorOnPoints& DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::operator= ( const TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor > &  other)
private

Assignment.

Parameters:
otherthe object to copy.
Returns:
a reference on 'this'. Forbidden by default.

Field Documentation

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
ConstIteratorOnPoints DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myBegin
private

Copy of the begin iterator.

Definition at line 169 of file TrueGlobalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
ConstIteratorOnPoints DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myEnd
private

Copy of the end iterator.

Definition at line 172 of file TrueGlobalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
bool DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myFlagIsClosed
private

Bool if the curve is closed.

Definition at line 160 of file TrueGlobalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
bool DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myFlagIsInit
private
template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
ParametricShapeFunctor DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myFunctor
private

Parametric quantity functor.

Definition at line 166 of file TrueGlobalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
double DGtal::TrueGlobalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myH
private

Grid size.

Definition at line 157 of file TrueGlobalEstimatorOnPoints.h.


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