Skip to content

Commit

Permalink
added in guassian derivative
Browse files Browse the repository at this point in the history
  • Loading branch information
Danbr4d committed Apr 29, 2024
1 parent 167aa1b commit cf64d54
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/math/function1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,18 @@ static std::map<Functions1D::Form, Function1DDefinition> functions1D_ = {
* ( 2 * c * c )
*/
[](double x, double omega, const std::vector<double> &params) { return exp(-(0.5 * x * x * params[2] * params[2])); },
// First derivative (not defined)
{},
/*
*
* 1 ( x * x )
* dy/dx = - ----- * x * exp ( - --------- )
* c**2 ( 2 * c * c )
*
*/
[](double x, double omega, const std::vector<double> &params)
{
auto c1 = (1 / params[2] * params[2]) * x;
return c1 * exp(-(0.5 * x * x * params[2] * params[2]));
},
/*
* ( x * x * c * c )
* FT(x) = exp ( - ------------- )
Expand Down

0 comments on commit cf64d54

Please sign in to comment.