diff options
Diffstat (limited to 'ripser.cpp')
-rw-r--r-- | ripser.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -36,6 +36,8 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <sstream> #include <unordered_map> +#include "prettyprint.hpp" + #ifdef USE_GOOGLE_HASHMAP #include <sparsehash/sparse_hash_map> template <class Key, class T> class hash_map : public google::sparse_hash_map<Key, T> { @@ -631,7 +633,15 @@ public: #ifdef INDICATE_PROGRESS std::cout << "\033[K"; #endif - std::cout << " [" << diameter << ", )" << std::endl << std::flush; +// std::cout << " [" << diameter << ", )" << std::endl << std::flush; + std::cout << " [" << diameter << ", ): {"; + auto cocycle = reduction_column; + while (get_index(pivot = get_pivot(cocycle, modulus)) != -1) { + std::cout << vertices_of_simplex(get_index(pivot), dim, n, binomial_coeff) << ":" << get_coefficient(pivot); + cocycle.pop(); + if (get_index(pivot = get_pivot(cocycle, modulus)) != -1) std::cout << ", "; + } + std::cout << "}" << std::endl; #endif break; } @@ -643,8 +653,17 @@ public: #ifdef INDICATE_PROGRESS std::cout << "\033[K"; #endif - std::cout << " [" << diameter << "," << death << ")" << std::endl << std::flush; +// std::cout << " [" << diameter << "," << death << ")" << std::endl << std::flush; + std::cout << " [" << diameter << "," << death << "): {"; + auto cocycle = reduction_column; + diameter_entry_t e; + while (get_index(e = get_pivot(cocycle, modulus)) != -1) { + std::cout << vertices_of_simplex(get_index(e), dim, n, binomial_coeff) << ":" << get_coefficient(pivot); + cocycle.pop(); + if (get_index(e = get_pivot(cocycle, modulus)) != -1) std::cout << ", "; } + std::cout << "}" << std::endl; + } #endif pivot_column_index.insert(std::make_pair(get_index(pivot), i)); |