Skip to content

Commit

Permalink
[CPP] Change cocycle type from int to index_t
Browse files Browse the repository at this point in the history
Signed-off-by: julian <[email protected]>
  • Loading branch information
julian committed Jan 7, 2022
1 parent 4c28463 commit 300e2f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gph/src/ripser.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ typedef uint16_t coefficient_t;
const size_t num_coefficient_bits = 8;

using barcodes_t = std::vector<value_t>;
using cocycle_t = std::vector<int>;
using cocycle_t = std::vector<index_t>;
using cocycles_t = std::vector<cocycle_t>;


Expand Down Expand Up @@ -1326,8 +1326,8 @@ class ripser
cocycle_simplex.clear();
get_simplex_vertices(get_index(cocycle_e), dim, n,
std::back_inserter(cocycle_simplex));
for (size_t k = 0; k < cocycle_simplex.size(); k++) {
thiscocycle.push_back((int) cocycle_simplex[k]);
for (auto& cocycle : cocycle_simplex) {
thiscocycle.push_back(cocycle);
}
thiscocycle.push_back(
normalize(get_coefficient(cocycle_e), modulus));
Expand Down

0 comments on commit 300e2f3

Please sign in to comment.