summaryrefslogtreecommitdiff
path: root/src/Persistence_representations/include/gudhi/PSSK.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/PSSK.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/PSSK.h')
-rw-r--r--src/Persistence_representations/include/gudhi/PSSK.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Persistence_representations/include/gudhi/PSSK.h b/src/Persistence_representations/include/gudhi/PSSK.h
index 59e73af4..53628737 100644
--- a/src/Persistence_representations/include/gudhi/PSSK.h
+++ b/src/Persistence_representations/include/gudhi/PSSK.h
@@ -26,6 +26,10 @@
// gudhi include
#include <gudhi/Persistence_heat_maps.h>
+#include <limits>
+#include <utility>
+#include <vector>
+
namespace Gudhi {
namespace Persistence_representations {
@@ -117,8 +121,8 @@ void PSSK::construct(const std::vector<std::pair<double, double> >& intervals_,
for (size_t pt_nr = 0; pt_nr != intervals_.size(); ++pt_nr) {
// compute the value of intervals_[pt_nr] in the grid:
- int x_grid = (int)((intervals_[pt_nr].first - this->min_) / (this->max_ - this->min_) * number_of_pixels);
- int y_grid = (int)((intervals_[pt_nr].second - this->min_) / (this->max_ - this->min_) * number_of_pixels);
+ int x_grid = static_cast<int>((intervals_[pt_nr].first - this->min_) / (this->max_ - this->min_) * number_of_pixels);
+ int y_grid = static_cast<int>((intervals_[pt_nr].second - this->min_) / (this->max_ - this->min_) * number_of_pixels);
if (dbg) {
std::cerr << "point : " << intervals_[pt_nr].first << " , " << intervals_[pt_nr].second << std::endl;
@@ -134,7 +138,6 @@ void PSSK::construct(const std::vector<std::pair<double, double> >& intervals_,
if (dbg) {
std::cerr << "After shift : \n";
- ;
std::cerr << "x_grid : " << x_grid << std::endl;
std::cerr << "y_grid : " << y_grid << std::endl;
std::cerr << "filter.size() : " << filter.size() << std::endl;