Skip to content
Permalink
Browse files

fixed warnings

  • Loading branch information...
ubauer committed Jul 20, 2019
1 parent c1d5a85 commit 7ab2df354dc78e508b294735cd706e9a665561a0
Showing with 12 additions and 9 deletions.
  1. +3 −3 Makefile
  2. +9 −6 ripser.cpp
@@ -5,13 +5,13 @@ all: ripser ripser-coeff ripser-debug


ripser: ripser.cpp
c++ -std=c++11 ripser.cpp -o ripser -Ofast -D NDEBUG
c++ -std=c++11 -Wall ripser.cpp -o ripser -Ofast -D NDEBUG

ripser-coeff: ripser.cpp
c++ -std=c++11 ripser.cpp -o ripser-coeff -Ofast -D NDEBUG -D USE_COEFFICIENTS
c++ -std=c++11 -Wall ripser.cpp -o ripser-coeff -Ofast -D NDEBUG -D USE_COEFFICIENTS

ripser-debug: ripser.cpp
c++ -std=c++11 ripser.cpp -o ripser-debug -g
c++ -std=c++11 -Wall ripser.cpp -o ripser-debug -g


clean:
@@ -72,7 +72,9 @@ typedef float value_t;
typedef int64_t index_t;
typedef uint16_t coefficient_t;

#ifdef INDICATE_PROGRESS
static const std::chrono::milliseconds time_step(40);
#endif

static const std::string clear_line("\r\033[K");

@@ -436,8 +438,8 @@ template <typename DistanceMatrix> class ripser {

#ifdef INDICATE_PROGRESS
std::cerr << clear_line << "assembling columns" << std::flush;
#endif
std::chrono::steady_clock::time_point next = std::chrono::steady_clock::now() + time_step;
#endif

--dim;
columns_to_reduce.clear();
@@ -603,8 +605,9 @@ template <typename DistanceMatrix> class ripser {

compressed_sparse_matrix<diameter_entry_t> reduction_matrix;

#ifdef INDICATE_PROGRESS
std::chrono::steady_clock::time_point next = std::chrono::steady_clock::now() + time_step;

#endif
for (index_t index_column_to_reduce = 0; index_column_to_reduce < columns_to_reduce.size();
++index_column_to_reduce) {

@@ -740,7 +743,7 @@ template <> class ripser<compressed_lower_distance_matrix>::simplex_coboundary_e

template <> class ripser<sparse_distance_matrix>::simplex_coboundary_enumerator {
const ripser& parent;
index_t idx_below, idx_above, v, k, max_vertex_below;
index_t idx_below, idx_above, k;
std::vector<index_t> vertices;
const diameter_entry_t simplex;
const coefficient_t modulus;
@@ -753,9 +756,9 @@ template <> class ripser<sparse_distance_matrix>::simplex_coboundary_enumerator
public:
simplex_coboundary_enumerator(const diameter_entry_t _simplex, const index_t _dim,
const ripser& _parent)
: parent(_parent), idx_below(get_index(_simplex)), idx_above(0), v(parent.n - 1),
k(_dim + 1), max_vertex_below(parent.n - 1), simplex(_simplex), modulus(parent.modulus),
dist(parent.dist), binomial_coeff(parent.binomial_coeff), vertices(_dim + 1),
: parent(_parent), idx_below(get_index(_simplex)), idx_above(0),
k(_dim + 1),
vertices(_dim + 1), simplex(_simplex), modulus(parent.modulus), dist(parent.dist), binomial_coeff(parent.binomial_coeff),
neighbor_it(dist.neighbor_it), neighbor_end(dist.neighbor_end) {
neighbor_it.clear();
neighbor_end.clear();

0 comments on commit 7ab2df3

Please sign in to comment.
You can’t perform that action at this time.