summaryrefslogtreecommitdiff
path: root/src/Bottleneck
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-07 12:38:11 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-07 12:38:11 +0000
commit796945fff0a49073d28a56400390594e5ba2371b (patch)
treed5dc99fc7e33bd745c1971f277b431c85274576a /src/Bottleneck
parent3fcbf94481bced31a342f6accec015d8d057a38b (diff)
Visual Studio errors fix
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/windowsbuildfix@545 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 86d04c258c64775217833a0fc5a76c53d5f7aaee
Diffstat (limited to 'src/Bottleneck')
-rw-r--r--src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h b/src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h
index a430fb4c..73ad940b 100644
--- a/src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h
+++ b/src/Bottleneck/include/gudhi/Persistence_diagrams_graph.h
@@ -33,6 +33,9 @@ namespace Gudhi {
namespace bottleneck {
+// Diagram_point is the type of the persistence diagram's points
+typedef std::pair<double, double> Diagram_point;
+
// Return the used index for encoding none of the points
int null_point_index();
@@ -41,9 +44,6 @@ int null_point_index();
class Persistence_diagrams_graph {
public:
- // Diagram_point is the type of the persistence diagram's points
- typedef typename std::pair<double, double> Diagram_point;
-
// Persistence_diagram1 and 2 are the types of any externals representations of persistence diagrams.
// They have to have an iterator over points, which have to have fields first (for birth) and second (for death).
template<typename Persistence_diagram1, typename Persistence_diagram2>
@@ -108,7 +108,7 @@ inline double Persistence_diagrams_graph::distance(int u_point_index, int v_poin
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));
+ 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 {
@@ -124,7 +124,7 @@ inline std::vector<double>* Persistence_diagrams_graph::sorted_distances() {
return new std::vector<double>(sorted_distances.cbegin(), sorted_distances.cend());
}
-inline Persistence_diagrams_graph::Diagram_point Persistence_diagrams_graph::get_u_point(int u_point_index) const {
+inline Diagram_point Persistence_diagrams_graph::get_u_point(int u_point_index) const {
if (!on_the_u_diagonal(u_point_index))
return u.at(u_point_index);
Diagram_point projector = v.at(corresponding_point_in_v(u_point_index));
@@ -132,7 +132,7 @@ inline Persistence_diagrams_graph::Diagram_point Persistence_diagrams_graph::get
return Diagram_point(x, x);
}
-inline Persistence_diagrams_graph::Diagram_point Persistence_diagrams_graph::get_v_point(int v_point_index) const {
+inline Diagram_point Persistence_diagrams_graph::get_v_point(int v_point_index) const {
if (!on_the_v_diagonal(v_point_index))
return v.at(v_point_index);
Diagram_point projector = u.at(corresponding_point_in_u(v_point_index));