diff options
author | Gard Spreemann <gspr@nonempty.org> | 2020-01-20 09:33:33 +0100 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2020-01-20 09:33:33 +0100 |
commit | 8c751c3929b1727c1e2e2781259ddaa39cfd8df3 (patch) | |
tree | 0e680ea9182032cc82a732230217980ada093ee9 /src/Persistence_representations/include/gudhi/Persistence_intervals.h | |
parent | a11db9cb0c8b35fa393c95d698754bb0c652b1d6 (diff) | |
parent | 9acc59fcc1d5001a212e7b9cd6f00a569a625882 (diff) |
Merge branch 'dfsg/latest' into debian/sid
Diffstat (limited to 'src/Persistence_representations/include/gudhi/Persistence_intervals.h')
-rw-r--r-- | src/Persistence_representations/include/gudhi/Persistence_intervals.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h index e2db4572..ea4220ea 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h +++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h @@ -6,6 +6,8 @@ * * Modification(s): * - YYYY/MM Author: Description of the modification + * - 2019/12 Vincent Rouvreau: Fix #118 - Make histogram_of_lengths and cumulative_histogram_of_lengths + * return the exact number_of_bins (was failing on x86) */ #ifndef PERSISTENCE_INTERVALS_H_ @@ -335,6 +337,9 @@ std::vector<size_t> Persistence_intervals::histogram_of_lengths(size_t number_of getchar(); } } + // we want number of bins equals to number_of_bins (some unexpected results on x86) + result[number_of_bins-1]+=result[number_of_bins]; + result.resize(number_of_bins); if (dbg) { for (size_t i = 0; i != result.size(); ++i) std::cerr << result[i] << std::endl; |