summaryrefslogtreecommitdiff
path: root/src/Persistence_representations/include/gudhi/Persistence_intervals.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-05-31 06:20:04 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-05-31 06:20:04 +0000
commit3a76dcb9f49671b01ae200a13569f47fca57dac0 (patch)
treebafbf8bed128e735682de744640ff4068518038e /src/Persistence_representations/include/gudhi/Persistence_intervals.h
parent93ee566f6ccdaed6bd00e53a3828dd09a97914e8 (diff)
Fix cpplint and cppcheck
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2480 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9ad6fc7b096fff02a8696515c074ddd92980a8e2
Diffstat (limited to 'src/Persistence_representations/include/gudhi/Persistence_intervals.h')
-rw-r--r--src/Persistence_representations/include/gudhi/Persistence_intervals.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Persistence_representations/include/gudhi/Persistence_intervals.h b/src/Persistence_representations/include/gudhi/Persistence_intervals.h
index 939ae274..9e614efd 100644
--- a/src/Persistence_representations/include/gudhi/Persistence_intervals.h
+++ b/src/Persistence_representations/include/gudhi/Persistence_intervals.h
@@ -32,9 +32,10 @@
#include <fstream>
#include <vector>
#include <algorithm>
-#include <limits>
#include <cmath>
#include <functional>
+#include <utility>
+#include <string>
namespace Gudhi {
namespace Persistence_representations {
@@ -402,7 +403,7 @@ std::vector<double> Persistence_intervals::characteristic_function_of_diagram(do
for (size_t pos = beginIt; pos != endIt; ++pos) {
result[pos] +=
- ((x_max - x_min) / (double)number_of_bins) * (this->intervals[i].second - this->intervals[i].first);
+ ((x_max - x_min) / static_cast<double>(number_of_bins)) * (this->intervals[i].second - this->intervals[i].first);
}
if (dbg) {
std::cerr << "Result at this stage \n";
@@ -564,6 +565,6 @@ double Persistence_intervals::project_to_R(int number_of_function) const {
}
} // namespace Persistence_representations
-} // namespace gudhi
+} // namespace Gudhi
#endif // PERSISTENCE_INTERVALS_H_