From 0c372ac3217ef31607c25266ff4394b5fa1ca2a8 Mon Sep 17 00:00:00 2001 From: mcarrier Date: Tue, 3 Jul 2018 05:52:22 +0000 Subject: corrected test units git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/kernels@3662 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 5b37dde84d00538ff15b7e638ba1f2d6800573c0 --- .../include/gudhi/common_persistence_representations.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Persistence_representations/include/gudhi/common_persistence_representations.h') 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) >; using Kernel = std::function, std::pair )>; Kernel Gaussian_kernel(double sigma){ - return [=](std::pair p, std::pair 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 p, std::pair 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){ -- cgit v1.2.3