DGtal 1.3.0
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Private Attributes
DGtal::functors::GaussianKernel Struct Reference

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

#include <DGtal/base/BasicFunctors.h>

Public Member Functions

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

Data Fields

double mySigma
 Sigma parameter. More...
 
double myCoef
 Temporary variable. More...
 

Private Attributes

double myCoef2
 Temporary variable. More...
 

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 946 of file BasicFunctors.h.

Constructor & Destructor Documentation

◆ GaussianKernel()

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

Constructor

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

Definition at line 953 of file BasicFunctors.h.

953 :mySigma(aSigma)
954 {
955 myCoef = 1.0/(mySigma * sqrt(2.0*M_PI));
956 myCoef2 = 1.0/(2.0*M_PI);
957 }
double myCoef2
Temporary variable.
double mySigma
Sigma parameter.
double myCoef
Temporary variable.

References myCoef, myCoef2, and mySigma.

Member Function Documentation

◆ operator()()

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 964 of file BasicFunctors.h.

965 {
966 ASSERT((aVal <= 1) && (aVal>=0));
967 return myCoef*exp(-aVal*aVal*myCoef2);
968 }

References myCoef, and myCoef2.

Field Documentation

◆ myCoef

double DGtal::functors::GaussianKernel::myCoef

Temporary variable.

Definition at line 974 of file BasicFunctors.h.

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

◆ myCoef2

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

Temporary variable.

Definition at line 977 of file BasicFunctors.h.

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

◆ mySigma

double DGtal::functors::GaussianKernel::mySigma

Sigma parameter.

Definition at line 971 of file BasicFunctors.h.

Referenced by GaussianKernel().


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