DGtal  0.9.3beta
Public Member Functions | Data Fields | Private Attributes
DGtal::functors::GaussianKernel Struct Reference

#include <DGtal/base/BasicFunctors.h>

Public Member Functions

 GaussianKernel (const double aSigma)
 
double operator() (const double aVal) const
 

Data Fields

double mySigma
 
double myCoef
 

Private Attributes

double myCoef2
 

Detailed Description

Aim: defines a functor on double numbers which corresponds to a Gaussian convolution kernel. This functor acts from [0,1] to [0,1].

Description of class 'GaussianKernel'

Definition at line 820 of file BasicFunctors.h.

Constructor & Destructor Documentation

DGtal::functors::GaussianKernel::GaussianKernel ( const double  aSigma)
inline

Constructor

Parameters
[in]aSigmathe sigma parameter of the Gaussian function.

Definition at line 827 of file BasicFunctors.h.

References myCoef, myCoef2, and mySigma.

827  :mySigma(aSigma)
828  {
829  myCoef = 1.0/(mySigma * sqrt(2.0*M_PI));
830  myCoef2 = 1.0/(2.0*M_PI);
831  }
double mySigma
Sigma parameter.
double myCoef
Temporary variable.
double myCoef2
Temporary variable.

Member Function Documentation

double DGtal::functors::GaussianKernel::operator() ( const double  aVal) const
inline
Returns
the Gaussian value at point aVal
Parameters
[in]aVala value between 0 and 1.

Definition at line 838 of file BasicFunctors.h.

References myCoef, and myCoef2.

839  {
840  ASSERT((aVal <= 1) && (aVal>=0));
841  return myCoef*exp(-aVal*aVal*myCoef2);
842  }
double myCoef
Temporary variable.
double myCoef2
Temporary variable.

Field Documentation

double DGtal::functors::GaussianKernel::myCoef

Temporary variable.

Definition at line 848 of file BasicFunctors.h.

Referenced by GaussianKernel(), and operator()().

double DGtal::functors::GaussianKernel::myCoef2
private

Temporary variable.

Definition at line 851 of file BasicFunctors.h.

Referenced by GaussianKernel(), and operator()().

double DGtal::functors::GaussianKernel::mySigma

Sigma parameter.

Definition at line 845 of file BasicFunctors.h.

Referenced by GaussianKernel().


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