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::TrueLocalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor > Class Template Reference

#include <TrueLocalEstimatorOnPoints.h>

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

Public Types

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

Public Member Functions

 TrueLocalEstimatorOnPoints ()
 ~TrueLocalEstimatorOnPoints ()
void init (const double h, const ConstIterator &itb, const ConstIterator &ite)
void attach (ParametricShape *aShapePtr)
Quantity eval (const ConstIterator &it) const
template<typename OutputIterator >
OutputIterator eval (const ConstIterator &itb, const ConstIterator &ite, OutputIterator result) const
bool isValid () const

Private Member Functions

 TrueLocalEstimatorOnPoints (const TrueLocalEstimatorOnPoints &other)
TrueLocalEstimatorOnPointsoperator= (const TrueLocalEstimatorOnPoints &other)

Private Attributes

double myH
ConstIterator myBegin
ConstIterator myEnd
ParametricShapeFunctormyFunctorPtr

Detailed Description

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

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

Description of template class 'TrueLocalEstimatorOnPoints'

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 68 of file TrueLocalEstimatorOnPoints.h.


Member Typedef Documentation

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
typedef TConstIteratorOnPoints DGtal::TrueLocalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::ConstIterator

Definition at line 74 of file TrueLocalEstimatorOnPoints.h.

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

Definition at line 76 of file TrueLocalEstimatorOnPoints.h.

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

Definition at line 79 of file TrueLocalEstimatorOnPoints.h.

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

Definition at line 80 of file TrueLocalEstimatorOnPoints.h.

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

Definition at line 77 of file TrueLocalEstimatorOnPoints.h.


Constructor & Destructor Documentation

template<typename CIt , typename PShape , typename PShapeFunctor >
DGtal::TrueLocalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::TrueLocalEstimatorOnPoints ( )
inline

Default constructor.

Definition at line 45 of file TrueLocalEstimatorOnPoints.ih.

:myH(0.0), myBegin(), myEnd(), myFunctorPtr(0)
{
}
template<typename CIt , typename PShape , typename PShapeFunctor >
DGtal::TrueLocalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::~TrueLocalEstimatorOnPoints ( )
inline

Destructor.

Definition at line 87 of file TrueLocalEstimatorOnPoints.ih.

{
delete myFunctorPtr;
}
template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
DGtal::TrueLocalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::TrueLocalEstimatorOnPoints ( const TrueLocalEstimatorOnPoints< 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 >
void DGtal::TrueLocalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::attach ( ParametricShape aShapePtr)
inline

Attach a shape

Parameters:
aShapePtrparametric shape

Definition at line 79 of file TrueLocalEstimatorOnPoints.ih.

{
}
template<typename CIt , typename PShape , typename PShapeFunctor >
DGtal::TrueLocalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::Quantity DGtal::TrueLocalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::eval ( const ConstIterator it) const
inline

Estimation at *it

Returns:
the estimated quantity at *it

Definition at line 97 of file TrueLocalEstimatorOnPoints.ih.

{
ASSERT( isValid() );
RealPoint p( *it );
p *= myH;
return myFunctorPtr->operator()(p);
}
template<typename CIt , typename PShape , typename PShapeFunctor >
template<typename OutputIterator >
OutputIterator DGtal::TrueLocalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::eval ( const ConstIterator itb,
const ConstIterator ite,
OutputIterator  result 
) const
inline

Estimation at each element of [itb , ite )

Parameters:
itb,beginiterator
ite,enditerator
Returns:
the estimated quantity from itb till ite (excluded)

Definition at line 111 of file TrueLocalEstimatorOnPoints.ih.

References DGtal::isNotEmpty().

{
ASSERT( isValid() );
// do-while loop to deal with the case of a whole circular range
if (isNotEmpty(itb, ite))
{
ConstIterator it = itb;
do
{
*result++ = eval( *it );
++it;
} while (it != ite);
}
return result;
}
template<typename CIt , typename PShape , typename PShapeFunctor >
void DGtal::TrueLocalEstimatorOnPoints< CIt, PShape, PShapeFunctor >::init ( const double  h,
const ConstIterator itb,
const ConstIterator ite 
)
inline

Initialisation.

Parameters:
hgrid size (must be >0).
itb,beginiterator
ite,enditerator

Definition at line 64 of file TrueLocalEstimatorOnPoints.ih.

{
myH = h;
ASSERT(myH > 0);
myBegin = itb;
myEnd = ite;
}
template<typename CIt , typename PShape , typename PShapeFunctor >
bool DGtal::TrueLocalEstimatorOnPoints< 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 54 of file TrueLocalEstimatorOnPoints.ih.

{
return ( (myH > 0)&&(myFunctorPtr != 0) );
}
template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
TrueLocalEstimatorOnPoints& DGtal::TrueLocalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::operator= ( const TrueLocalEstimatorOnPoints< 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>
ConstIterator DGtal::TrueLocalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myBegin
private

Copy of the begin iterator.

Definition at line 151 of file TrueLocalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
ConstIterator DGtal::TrueLocalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myEnd
private

Copy of the end iterator.

Definition at line 154 of file TrueLocalEstimatorOnPoints.h.

template<typename TConstIteratorOnPoints, typename TParametricShape, typename TParametricShapeFunctor>
ParametricShapeFunctor* DGtal::TrueLocalEstimatorOnPoints< TConstIteratorOnPoints, TParametricShape, TParametricShapeFunctor >::myFunctorPtr
private

Owning pointer on a parametric shape functor.

Definition at line 157 of file TrueLocalEstimatorOnPoints.h.

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

Grid size.

Definition at line 148 of file TrueLocalEstimatorOnPoints.h.


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