summaryrefslogtreecommitdiff
path: root/src/common/include/gudhi/reader_utils.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-06-16 09:31:43 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-06-16 09:31:43 +0000
commitcdb39c39a60fe06009168c1ecb1d4ce5de0bed8c (patch)
tree40890c94206d889e50073f9ad71318ae55889aa7 /src/common/include/gudhi/reader_utils.h
parenta6b6f91bfd5a86ee88297b27f18c2bc7d38f6db4 (diff)
Fix auto lambda (requires C++14) compilation issue
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/read_persistence_from_file@2550 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: df64cfdde77500b06f00432a1d1532518cd4dd37
Diffstat (limited to 'src/common/include/gudhi/reader_utils.h')
-rw-r--r--src/common/include/gudhi/reader_utils.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h
index 8df20dcc..f1684d78 100644
--- a/src/common/include/gudhi/reader_utils.h
+++ b/src/common/include/gudhi/reader_utils.h
@@ -25,8 +25,8 @@
#include <gudhi/graph_simplicial_complex.h>
#include <gudhi/Debug_utils.h>
-#include <boost/function_output_iterator.hpp>
+#include <boost/function_output_iterator.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <iostream>
@@ -340,12 +340,12 @@ The return value is an `std::map<dim, std::vector<std::pair<birth, death>>>`
where `dim` is an `int`, `birth` a `double`, and `death` a `double`.
Note: the function does not check that birth <= death.
**/
-std::map<int, std::vector<std::pair<double, double>>> read_persistence_intervals_grouped_by_dimension(std::string const& filename) {
+inline std::map<int, std::vector<std::pair<double, double>>> read_persistence_intervals_grouped_by_dimension(std::string const& filename) {
std::map<int, std::vector<std::pair<double, double>>> ret;
read_persistence_intervals_and_dimension(
filename,
- boost::make_function_output_iterator([&ret](auto t) { ret[get<0>(t)].push_back(std::make_pair(get<1>(t), get<2>(t))); }));
+ boost::make_function_output_iterator([&ret](std::tuple<int, double, double> t) { ret[get<0>(t)].push_back(std::make_pair(get<1>(t), get<2>(t))); }));
return ret;
} // read_persistence_diagram_from_file
@@ -360,12 +360,12 @@ The return value is an `std::vector<std::pair<birth, death>>`
where `dim` is an `int`, `birth` a `double`, and `death` a `double`.
Note: the function does not check that birth <= death.
**/
-std::vector<std::pair<double, double>> read_persistence_intervals_in_dimension(std::string const& filename, int only_this_dim = -1) {
+inline std::vector<std::pair<double, double>> read_persistence_intervals_in_dimension(std::string const& filename, int only_this_dim = -1) {
std::vector<std::pair<double, double>> ret;
read_persistence_intervals_and_dimension(
filename,
- boost::make_function_output_iterator([&ret](auto t) { ret.emplace_back(get<1>(t), get<2>(t)); }));
+ boost::make_function_output_iterator([&ret](std::tuple<int, double, double> t) { ret.emplace_back(get<1>(t), get<2>(t)); }));
return ret;
} // read_persistence_diagram_from_file