From a823bfcb70ed76e8858604050570ff8fe33f6667 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 20 Jan 2017 12:42:27 +0000 Subject: cpplint fixes doxygen warning fixes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bottleneck_misc_fixes@1972 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 5b2328016edb6b5b30de668a0488c576d3d92c40 --- src/Bottleneck_distance/include/gudhi/Persistence_graph.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/Bottleneck_distance/include/gudhi/Persistence_graph.h') diff --git a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h index 3a4a5fec..39efc082 100644 --- a/src/Bottleneck_distance/include/gudhi/Persistence_graph.h +++ b/src/Bottleneck_distance/include/gudhi/Persistence_graph.h @@ -23,9 +23,11 @@ #ifndef PERSISTENCE_GRAPH_H_ #define PERSISTENCE_GRAPH_H_ +#include + #include #include -#include +#include // for numeric_limits namespace Gudhi { @@ -92,10 +94,12 @@ Persistence_graph::Persistence_graph(const Persistence_diagram1 &diag1, swap(u, v); std::sort(u_alive.begin(), u_alive.end()); std::sort(v_alive.begin(), v_alive.end()); - if (u_alive.size() != v_alive.size()) + if (u_alive.size() != v_alive.size()) { b_alive = std::numeric_limits::infinity(); - else for (auto it_u = u_alive.cbegin(), it_v = v_alive.cbegin(); it_u != u_alive.cend(); ++it_u, ++it_v) + } else { + for (auto it_u = u_alive.cbegin(), it_v = v_alive.cbegin(); it_u != u_alive.cend(); ++it_u, ++it_v) b_alive = std::max(b_alive, std::fabs(*it_u - *it_v)); + } } inline bool Persistence_graph::on_the_u_diagonal(int u_point_index) const { -- cgit v1.2.3