NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
gaussian1d.hpp
Go to the documentation of this file.
1
#pragma once
29
30
#include "
NumCpp/Utils/sqr.hpp
"
31
32
#include <cmath>
33
34
namespace
nc
35
{
36
namespace
utils
37
{
38
//============================================================================
39
// Method Description:
48
inline
double
gaussian1d
(
double
inX,
double
inMu,
double
inSigma) noexcept
49
{
50
double
exponent =
sqr
(inX - inMu);
51
exponent /= 2;
52
exponent /=
sqr
(inSigma);
53
return
std::exp
(-exponent);
54
}
55
}
// namespace utils
56
}
// namespace nc
nc::utils::gaussian1d
double gaussian1d(double inX, double inMu, double inSigma) noexcept
Definition:
gaussian1d.hpp:48
nc::exp
auto exp(dtype inValue) noexcept
Definition:
exp.hpp:51
nc
Definition:
Coordinate.hpp:44
sqr.hpp
nc::utils::sqr
constexpr dtype sqr(dtype inValue) noexcept
Definition:
sqr.hpp:44
include
NumCpp
Utils
gaussian1d.hpp
Generated by
1.8.17