NumCpp  2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gaussian1d.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <cmath>
31
32#include "NumCpp/Utils/sqr.hpp"
33
34namespace nc::utils
35{
36 //============================================================================
37 // Method Description:
46 inline double gaussian1d(double inX, double inMu, double inSigma) noexcept
47 {
48 double exponent = sqr(inX - inMu);
49 exponent /= 2;
51 return std::exp(-exponent);
52 }
53} // namespace nc::utils
Definition Utils/cube.hpp:33
double gaussian1d(double inX, double inMu, double inSigma) noexcept
Definition gaussian1d.hpp:46
constexpr dtype sqr(dtype inValue) noexcept
Definition sqr.hpp:42
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59