NumCpp  1.0
A C++ implementation of the Python Numpy library
gaussian.hpp
Go to the documentation of this file.
1 #pragma once
30 
31 #include "NumCpp/Utils/sqr.hpp"
32 
33 #include <cmath>
34 
35 namespace nc
36 {
37  namespace utils
38  {
39  //============================================================================
40  // Method Description:
49  inline double gaussian(double inX, double inY, double inSigma) noexcept
50  {
51  double exponent = sqr(inX) + sqr(inY);
52  exponent /= 2;
53  exponent /= sqr(inSigma);
54  return std::exp(-exponent);
55  }
56  }
57 }
nc::utils::gaussian
double gaussian(double inX, double inY, double inSigma) noexcept
Definition: gaussian.hpp:49
nc::exp
auto exp(dtype inValue) noexcept
Definition: exp.hpp:52
nc
Definition: Coordinate.hpp:45
sqr.hpp
nc::utils::sqr
constexpr dtype sqr(dtype inValue) noexcept
Definition: sqr.hpp:45