From e1d693231f71bdf000d6471a74b6bfa5d762d82f Mon Sep 17 00:00:00 2001 From: Ulrich Bauer Date: Thu, 30 Mar 2017 08:55:53 +0200 Subject: post-merge updates --- Makefile | 2 +- ripser.cpp | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3704813..8569d34 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ build: ripser-representatives ripser-representatives: ripser.cpp - c++ -std=c++11 ripser.cpp -o ripser-representatives -Ofast -D NDEBUG -D USE_COEFFICIENTS -D ASSEMBLE_REDUCTION_MATRIX -D USE_GOOGLE_HASHMAP + c++ -std=c++11 ripser.cpp -o ripser-representatives -Ofast -D NDEBUG -D _USE_COEFFICIENTS -D ASSEMBLE_REDUCTION_MATRIX -D USE_GOOGLE_HASHMAP clean: rm -f ripser-representatives diff --git a/ripser.cpp b/ripser.cpp index 430f063..97d4600 100644 --- a/ripser.cpp +++ b/ripser.cpp @@ -637,7 +637,12 @@ public: 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); + vertices.clear(); + get_simplex_vertices(get_index(pivot), dim, n, std::back_inserter(vertices)); + std::cout << vertices; +#ifdef USE_COEFFICIENTS + std::cout << ":" << get_coefficient(pivot); +#endif cocycle.pop(); if (get_index(pivot = get_pivot(cocycle, modulus)) != -1) std::cout << ", "; } @@ -658,7 +663,12 @@ public: 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); + vertices.clear(); + get_simplex_vertices(get_index(e), dim, n, std::back_inserter(vertices)); + std::cout << vertices; +#ifdef USE_COEFFICIENTS + std::cout << ":" << get_coefficient(pivot); +#endif cocycle.pop(); if (get_index(e = get_pivot(cocycle, modulus)) != -1) std::cout << ", "; } -- cgit v1.2.3