diff options
Diffstat (limited to 'src/Persistence_representations/include/gudhi')
-rw-r--r-- | src/Persistence_representations/include/gudhi/common_persistence_representations.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h index 024c99ec..66ed3bf8 100644 --- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h +++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h @@ -49,7 +49,7 @@ using Weight = std::function<double (std::pair<double, double>) >; using Kernel = std::function<double (std::pair<double, double>, std::pair<double, double> )>; Kernel Gaussian_kernel(double sigma){ - return [=](std::pair<double, double> p, std::pair<double, double> q){return std::exp( -((p.first-q.first)*(p.first-q.first) + (p.second-q.second)*(p.second-q.second)) / (sigma*sigma) );}; + return [=](std::pair<double, double> p, std::pair<double, double> q){return (1.0 / (std::sqrt(2*pi)*sigma)) * std::exp( -((p.first-q.first)*(p.first-q.first) + (p.second-q.second)*(p.second-q.second)) / (2*sigma*sigma) );}; } Kernel polynomial_kernel(double c, double d){ |