From a42bcc71298f414bc7f2e8a18b408b5939e72ece Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 28 May 2019 14:23:35 +0200 Subject: std::numeric_limits::max conflict with windows max macro --- src/Nerve_GIC/include/gudhi/GIC.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Nerve_GIC') diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index 6bcd5c0e..11bb4e85 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -640,7 +640,7 @@ class Cover_complex { } // Read function values and compute min and max - double minf = std::numeric_limits::max(); + double minf = (std::numeric_limits::max)(); double maxf = std::numeric_limits::lowest(); for (int i = 0; i < n; i++) { minf = (std::min)(minf, func[i]); @@ -899,7 +899,7 @@ class Cover_complex { Weight_map weight = boost::get(boost::edge_weight, one_skeleton); Index_map index = boost::get(boost::vertex_index, one_skeleton); std::vector mindist(n); - for (int j = 0; j < n; j++) mindist[j] = std::numeric_limits::max(); + for (int j = 0; j < n; j++) mindist[j] = (std::numeric_limits::max)(); // Compute the geodesic distances to subsamples with Dijkstra #ifdef GUDHI_USE_TBB @@ -1027,7 +1027,7 @@ class Cover_complex { std::ofstream graphic(mapp); double maxv = std::numeric_limits::lowest(); - double minv = std::numeric_limits::max(); + double minv = (std::numeric_limits::max)(); for (std::map >::iterator iit = cover_color.begin(); iit != cover_color.end(); iit++) { maxv = (std::max)(maxv, iit->second.second); minv = (std::min)(minv, iit->second.second); @@ -1162,7 +1162,7 @@ class Cover_complex { // Compute max and min double maxf = std::numeric_limits::lowest(); - double minf = std::numeric_limits::max(); + double minf = (std::numeric_limits::max)(); for (std::map::iterator it = cover_std.begin(); it != cover_std.end(); it++) { maxf = (std::max)(maxf, it->second); minf = (std::min)(minf, it->second); @@ -1294,7 +1294,7 @@ class Cover_complex { * */ double compute_p_value() { - double distancemin = std::numeric_limits::max(); int N = PD.size(); + double distancemin = (std::numeric_limits::max)(); int N = PD.size(); for (int i = 0; i < N; i++) distancemin = (std::min)(distancemin, 0.5 * std::abs(PD[i].second - PD[i].first)); double p_value = 1 - compute_confidence_level_from_distance(distancemin); if (verbose) std::cout << "p value = " << p_value << std::endl; -- cgit v1.2.3