summaryrefslogtreecommitdiff
path: root/src/Bitmap_cubical_complex
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-05-25 13:21:43 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-05-25 13:21:43 +0000
commit2745d59751e862701d675470994978ca460ac870 (patch)
treea6fe91d3c4941de652ef26919a787f7bf3d486da /src/Bitmap_cubical_complex
parente996b0fd0a0aecfa3b77e0ff3780f31b1b8bab4a (diff)
Fix bug on Cubical reported by user.
Add test on Python level. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3461 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fffa8df624f81427d0feef6ddc3f8a567aa2d366
Diffstat (limited to 'src/Bitmap_cubical_complex')
-rw-r--r--src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h4
-rw-r--r--src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h
index 47e71f8a..e06d198b 100644
--- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h
+++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_base.h
@@ -492,7 +492,7 @@ class Bitmap_cubical_complex_base {
this->multipliers.push_back(multiplier);
multiplier *= 2 * sizes[i] + 1;
}
- this->data = std::vector<T>(multiplier, std::numeric_limits<T>::max());
+ this->data = std::vector<T>(multiplier, std::numeric_limits<T>::infinity());
this->total_number_of_cells = multiplier;
}
@@ -562,7 +562,7 @@ void Bitmap_cubical_complex_base<T>::put_data_to_bins(T diameter_of_bin) {
template <typename T>
std::pair<T, T> Bitmap_cubical_complex_base<T>::min_max_filtration() {
- std::pair<T, T> min_max(std::numeric_limits<T>::max(), std::numeric_limits<T>::min());
+ std::pair<T, T> min_max(std::numeric_limits<T>::infinity(), std::numeric_limits<T>::min());
for (std::size_t i = 0; i != this->data.size(); ++i) {
if (this->data[i] < min_max.first) min_max.first = this->data[i];
if (this->data[i] > min_max.second) min_max.second = this->data[i];
diff --git a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h
index 97070cda..8c35f590 100644
--- a/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h
+++ b/src/Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex_periodic_boundary_conditions_base.h
@@ -177,7 +177,7 @@ class Bitmap_cubical_complex_periodic_boundary_conditions_base : public Bitmap_c
}
}
// std::reverse( this->sizes.begin() , this->sizes.end() );
- this->data = std::vector<T>(multiplier, std::numeric_limits<T>::max());
+ this->data = std::vector<T>(multiplier, std::numeric_limits<T>::infinity());
this->total_number_of_cells = multiplier;
}
Bitmap_cubical_complex_periodic_boundary_conditions_base(const std::vector<unsigned>& sizes);