DGtal 1.4.0
Loading...
Searching...
No Matches
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

◆ argument_type

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

Definition at line 82 of file ScalarFunctors.h.

◆ Scalar

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

Definition at line 81 of file ScalarFunctors.h.

◆ value_type

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

Definition at line 83 of file ScalarFunctors.h.

Constructor & Destructor Documentation

◆ BallConstantFunction()

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

Member Function Documentation

◆ operator()()

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

Definition at line 91 of file ScalarFunctors.h.

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

References DGtal::functors::BallConstantFunction< TScalar >::myR, and DGtal::functors::BallConstantFunction< TScalar >::myV0.

Field Documentation

◆ myR

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

◆ myV0

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

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