summaryrefslogtreecommitdiff
path: root/src/Persistence_representations
diff options
context:
space:
mode:
authormcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-11-01 16:22:18 +0000
committermcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-11-01 16:22:18 +0000
commitfcd48b45c75dde8ae95819866edf7de1085762ce (patch)
tree59207228dfbb5e671896f43e0416ced7adea78d6 /src/Persistence_representations
parent78a118fabcee13aab0ca66cf8738b20c95f5d8dd (diff)
corrected typo on gudhi check
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/kernels@3972 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 189918d46ac4ddcfc85977f192ceb5ca569a2a8a
Diffstat (limited to 'src/Persistence_representations')
-rw-r--r--src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h b/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h
index 8fc4bd15..5d0f4a5d 100644
--- a/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h
+++ b/src/Persistence_representations/include/gudhi/Sliced_Wasserstein.h
@@ -143,7 +143,7 @@ class Sliced_Wasserstein {
// Evaluation of the Sliced Wasserstein Distance between a pair of diagrams.
double compute_sliced_wasserstein_distance(const Sliced_Wasserstein & second) const {
- GUDHI_CHECK(this->approx != second.approx, std::invalid_argument("Error: different approx values for representations"));
+ GUDHI_CHECK(this->approx == second.approx, std::invalid_argument("Error: different approx values for representations"));
Persistence_diagram diagram1 = this->diagram; Persistence_diagram diagram2 = second.diagram; double sw = 0;
@@ -283,7 +283,7 @@ class Sliced_Wasserstein {
*
*/
double compute_scalar_product(const Sliced_Wasserstein & second) const {
- GUDHI_CHECK(this->sigma != second.sigma, std::invalid_argument("Error: different sigma values for representations"));
+ GUDHI_CHECK(this->sigma == second.sigma, std::invalid_argument("Error: different sigma values for representations"));
return std::exp(-compute_sliced_wasserstein_distance(second)/(2*this->sigma*this->sigma));
}
@@ -295,7 +295,7 @@ class Sliced_Wasserstein {
*
*/
double distance(const Sliced_Wasserstein & second) const {
- GUDHI_CHECK(this->sigma != second.sigma, std::invalid_argument("Error: different sigma values for representations"));
+ GUDHI_CHECK(this->sigma == second.sigma, std::invalid_argument("Error: different sigma values for representations"));
return std::pow(this->compute_scalar_product(*this) + second.compute_scalar_product(second)-2*this->compute_scalar_product(second), 0.5);
}