summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhschreiber <hannah.schreiber.k@gmail.com>2022-10-18 17:31:34 +0200
committerhschreiber <hannah.schreiber.k@gmail.com>2022-10-18 17:31:34 +0200
commitff59ebb1a3417701a9282783adeb254af14b856c (patch)
tree7c43a758ca6199baa33e78aa5013e31a76468bda
parentd18ef465b79fe53b103bb05d75d7f71b37792276 (diff)
syntax correction
-rw-r--r--src/Bottleneck_distance/include/gudhi/Persistence_graph.h2
-rw-r--r--src/Bottleneck_distance/test/bottleneck_unit_test.cpp2
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<double>::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<double, double> > v1, v2;
double inf = std::numeric_limits<double>::infinity();
- double neginf = -1 * inf;
+ double neginf = -inf;
double b;
v1.emplace_back(9.6, 14.);