diff options
author | MathieuCarriere <mathieu.carriere3@gmail.com> | 2020-04-28 19:28:24 -0400 |
---|---|---|
committer | MathieuCarriere <mathieu.carriere3@gmail.com> | 2020-04-28 19:28:24 -0400 |
commit | c2b6d95f0b01ca913ddc704350cbfe37bcf13c3a (patch) | |
tree | f00f1c960c185c956fcd016fbbbb1178dbd301e2 /src/python/include | |
parent | 4923f2bd8a18d2f66288f39c08309cb7cafa5627 (diff) |
update output
Diffstat (limited to 'src/python/include')
-rw-r--r-- | src/python/include/Persistent_cohomology_interface.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/python/include/Persistent_cohomology_interface.h b/src/python/include/Persistent_cohomology_interface.h index 59024212..32e6ee9c 100644 --- a/src/python/include/Persistent_cohomology_interface.h +++ b/src/python/include/Persistent_cohomology_interface.h @@ -16,6 +16,7 @@ #include <vector> #include <utility> // for std::pair #include <algorithm> // for sort +#include <unordered_map> namespace Gudhi { @@ -80,8 +81,9 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol } // Sort these simplex handles and compute the ordering function // This function allows to go directly from the simplex handle to the position of the corresponding top-dimensional cell in the input data - std::map<int, int> order; std::sort(max_splx.begin(), max_splx.end()); - for (unsigned int i = 0; i < max_splx.size(); i++) order.insert(std::make_pair(max_splx[i], i)); + std::unordered_map<int, int> order; + //std::sort(max_splx.begin(), max_splx.end()); + for (unsigned int i = 0; i < max_splx.size(); i++) order.emplace(max_splx[i], i); std::vector<std::vector<int>> persistence_pairs; for (auto pair : pairs) { |