summaryrefslogtreecommitdiff
path: root/src/Bottleneck/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bottleneck/include')
-rw-r--r--src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h b/src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h
index 8e9eaaf6..105f9059 100644
--- a/src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h
+++ b/src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h
@@ -34,7 +34,7 @@ namespace Gudhi {
namespace bottleneck {
// Diagram_point is the type of the persistence diagram's points
-typedef typename std::pair<double, double> Diagram_point;
+typedef std::pair<double, double> Diagram_point;
// Return the used index for encoding none of the points
int null_point_index();
@@ -82,7 +82,7 @@ Persistence_diagrams_graph::Persistence_diagrams_graph(const Persistence_diagram
swap(u, v);
}
-Persistence_diagrams_graph::Persistence_diagrams_graph::Persistence_diagrams_graph()
+Persistence_diagrams_graph::Persistence_diagrams_graph()
: u(), v() { }
inline bool Persistence_diagrams_graph::on_the_u_diagonal(int u_point_index) const {
@@ -104,12 +104,12 @@ inline int Persistence_diagrams_graph::corresponding_point_in_v(int u_point_inde
}
inline double Persistence_diagrams_graph::distance(int u_point_index, int v_point_index) const {
- // could be optimized for the case where one point is the projection of the other
- if (on_the_u_diagonal(u_point_index) && on_the_v_diagonal(v_point_index))
- return 0;
- Diagram_point p_u = get_u_point(u_point_index);
- Diagram_point p_v = get_v_point(v_point_index);
- return std::max(std::fabs(p_u.first - p_v.first), std::fabs(p_u.second - p_v.second));
+ // could be optimized for the case where one point is the projection of the other
+ if (on_the_u_diagonal(u_point_index) && on_the_v_diagonal(v_point_index))
+ return 0;
+ Diagram_point p_u = get_u_point(u_point_index);
+ Diagram_point p_v = get_v_point(v_point_index);
+ return (std::max)(std::fabs(p_u.first - p_v.first), std::fabs(p_u.second - p_v.second));
}
inline int Persistence_diagrams_graph::size() const {