diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2019-02-12 14:59:28 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2019-02-12 14:59:28 +0000 |
commit | 36e654407b7f4bbedc2790e9c0d6e8ec60415258 (patch) | |
tree | 0da92a78fad0b15c119c18480b6d98d94924c78e /src/Bitmap_cubical_complex/test/Bitmap_test.cpp | |
parent | 2905296b253588bd43de924d44585f9bfbd45540 (diff) | |
parent | f29a6e9a03dca95dc0a070b604fb11e18897a6f6 (diff) |
merge cubical_small_fix to fix
https://gitlab.inria.fr/GUDHI/gudhi-devel/issues/5 [Bitmap_cubical_complex] Perseus file reader rejects infinity
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@4103 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: b036b89564e31e4c385cb0b782db22a3ca445a9f
Diffstat (limited to 'src/Bitmap_cubical_complex/test/Bitmap_test.cpp')
-rw-r--r-- | src/Bitmap_cubical_complex/test/Bitmap_test.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp index ca7bd986..6a917c25 100644 --- a/src/Bitmap_cubical_complex/test/Bitmap_test.cpp +++ b/src/Bitmap_cubical_complex/test/Bitmap_test.cpp @@ -32,6 +32,7 @@ #include <iostream> #include <sstream> #include <vector> +#include <limits> typedef Gudhi::cubical_complex::Bitmap_cubical_complex_base<double> Bitmap_cubical_complex_base; typedef Gudhi::cubical_complex::Bitmap_cubical_complex<Bitmap_cubical_complex_base> Bitmap_cubical_complex; @@ -1576,3 +1577,17 @@ BOOST_AUTO_TEST_CASE(compute_incidence_between_cells_test_periodic_boundary_cond } } } + +BOOST_AUTO_TEST_CASE(perseus_file_read) { + Bitmap_cubical_complex increasing("sinusoid.txt"); + + auto it = increasing.top_dimensional_cells_iterator_begin(); + double value = increasing.get_cell_data(*it); + std::cout << "First value of sinusoid.txt is " << value << std::endl; + BOOST_CHECK(value == 10.); + // Next value + ++it; + value = increasing.get_cell_data(*it); + std::cout << "Second value of sinusoid.txt is " << value << std::endl; + BOOST_CHECK(value == std::numeric_limits<double>::infinity()); +} |