DGtal  0.9.3beta
Public Types | Public Member Functions | Data Fields
DGtal::functors::BallConstantFunction< TScalar > Struct Template Reference

#include <DGtal/math/ScalarFunctors.h>

Public Types

typedef TScalar Scalar
 
typedef Scalar argument_type
 
typedef Scalar value_type
 

Public Member Functions

 BallConstantFunction (Scalar v0, Scalar r)
 
Scalar operator() (Scalar d) const
 

Data Fields

Scalar myV0
 
Scalar myR
 

Detailed Description

template<typename TScalar>
struct DGtal::functors::BallConstantFunction< TScalar >

The ball constant function of value v0 between 0 and r, 0 elsewhere. A function Scalar -> Scalar.

Definition at line 80 of file ScalarFunctors.h.

Member Typedef Documentation

template<typename TScalar >
typedef Scalar DGtal::functors::BallConstantFunction< TScalar >::argument_type

Definition at line 82 of file ScalarFunctors.h.

template<typename TScalar >
typedef TScalar DGtal::functors::BallConstantFunction< TScalar >::Scalar

Definition at line 81 of file ScalarFunctors.h.

template<typename TScalar >
typedef Scalar DGtal::functors::BallConstantFunction< TScalar >::value_type

Definition at line 83 of file ScalarFunctors.h.

Constructor & Destructor Documentation

template<typename TScalar >
DGtal::functors::BallConstantFunction< TScalar >::BallConstantFunction ( Scalar  v0,
Scalar  r 
)
inline

Definition at line 89 of file ScalarFunctors.h.

Member Function Documentation

template<typename TScalar >
Scalar DGtal::functors::BallConstantFunction< TScalar >::operator() ( Scalar  d) const
inline

Definition at line 91 of file ScalarFunctors.h.

References DGtal::functors::BallConstantFunction< TScalar >::myV0.

92  {// d >= 0
93  ASSERT( d >= 0.0 );
94  return ( d > myR ) ? 0.0 : myV0;
95  }

Field Documentation

template<typename TScalar >
Scalar DGtal::functors::BallConstantFunction< TScalar >::myR

Definition at line 86 of file ScalarFunctors.h.

template<typename TScalar >
Scalar DGtal::functors::BallConstantFunction< TScalar >::myV0

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