diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-08-05 09:58:11 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-08-05 09:58:11 +0000 |
commit | 9b4c31ef855bf5c98718675a9caab52e8d8514e7 (patch) | |
tree | dced3921f411ac6ece1cd43c2b28d8d2421e73d2 /src/Persistent_cohomology/include | |
parent | 37b34936433bb8a2683f5987729493e6fdff33c5 (diff) |
Fix the 3 billions of simplices limit
Add some comment and documentation about the new limit (4 billions)
Rephrase third party library installation documentation
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/3billions_simplices_fix@1420 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 95b20677e455b61578da74aabbd3764b4a27816d
Diffstat (limited to 'src/Persistent_cohomology/include')
-rw-r--r-- | src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index a7d1e463..d3da812e 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -41,6 +41,7 @@ #include <tuple> #include <algorithm> #include <string> +#include <stdexcept> // for std::out_of_range namespace Gudhi { @@ -89,6 +90,7 @@ class Persistent_cohomology { * * @param[in] cpx Complex for which the persistent homology is computed. * cpx is a model of FilteredComplex + * @exception std::out_of_range In case the number of simplices is more than Simplex_key type numeric limit. */ explicit Persistent_cohomology(Complex_ds& cpx) : cpx_(&cpx), @@ -106,6 +108,9 @@ class Persistent_cohomology { interval_length_policy(&cpx, 0), column_pool_(), // memory pools for the CAM cell_pool_() { + if (cpx_->num_simplices() > std::numeric_limits<Simplex_key>::max()) { + throw std::out_of_range ("The number of simplices is more than Simplex_key type numeric limit."); + } Simplex_key idx_fil = 0; for (auto sh : cpx_->filtration_simplex_range()) { cpx_->assign_key(sh, idx_fil); |