From ff59ebb1a3417701a9282783adeb254af14b856c Mon Sep 17 00:00:00 2001 From: hschreiber Date: Tue, 18 Oct 2022 17:31:34 +0200 Subject: syntax correction --- src/Bottleneck_distance/include/gudhi/Persistence_graph.h | 2 +- src/Bottleneck_distance/test/bottleneck_unit_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h index 9b663cc2..de989e1b 100644 --- a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h +++ b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h @@ -76,7 +76,7 @@ Persistence_graph::Persistence_graph(const Persistence_diagram1 &diag1, int u_inf = 0; int v_inf = 0; double inf = std::numeric_limits::infinity(); - double neginf = -1 * inf; + double neginf = -inf; for (auto it = std::begin(diag1); it != std::end(diag1); ++it) { if (std::get<0>(*it) != inf && std::get<1>(*it) != neginf){ diff --git a/src/Bottleneck_distance/test/bottleneck_unit_test.cpp b/src/Bottleneck_distance/test/bottleneck_unit_test.cpp index 79ee9c2c..38ed89a8 100644 --- a/src/Bottleneck_distance/test/bottleneck_unit_test.cpp +++ b/src/Bottleneck_distance/test/bottleneck_unit_test.cpp @@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE(neg_global) { BOOST_AUTO_TEST_CASE(bottleneck_simple_test) { std::vector< std::pair > v1, v2; double inf = std::numeric_limits::infinity(); - double neginf = -1 * inf; + double neginf = -inf; double b; v1.emplace_back(9.6, 14.); -- cgit v1.2.3