diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-01-08 12:32:49 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-01-08 12:32:49 +0000 |
commit | 7cf0599b211bc6cd5e8a64a75550cdf40b3fbb14 (patch) | |
tree | 768f0681a7798d382150643d6a21b893c7199728 /src/Persistence_representations/include/gudhi/Persistence_heat_maps.h | |
parent | d37d7b65e5ecaf3f7ada2874197cae4184594574 (diff) | |
parent | c64433834bdf168975aa7785b03cdcfdd67c6915 (diff) |
Merge of persistence_representations_fix_reading branch + clang format files
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3116 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 0bae116ddc294d46e347d61fecc6e76b1e13f053
Diffstat (limited to 'src/Persistence_representations/include/gudhi/Persistence_heat_maps.h')
-rw-r--r-- | src/Persistence_representations/include/gudhi/Persistence_heat_maps.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h index 04dd78ad..fb741642 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h +++ b/src/Persistence_representations/include/gudhi/Persistence_heat_maps.h @@ -582,10 +582,10 @@ void Persistence_heat_maps<Scalling_of_kernels>::construct(const std::vector<std 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 = 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); + 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; @@ -797,8 +797,7 @@ void Persistence_heat_maps<Scalling_of_kernels>::load_from_file(const char* file std::string temp; std::getline(in, temp); - - while (!in.eof()) { + while (in.good()) { std::getline(in, temp); std::stringstream lineSS; lineSS << temp; |