summaryrefslogtreecommitdiff
path: root/src/python/include/Persistent_cohomology_interface.h
diff options
context:
space:
mode:
authormathieu <mathieu.carriere3@gmail.com>2020-01-16 16:17:38 -0500
committermathieu <mathieu.carriere3@gmail.com>2020-01-16 16:17:38 -0500
commitc89df405c77bb7270db1a7d8f0e49bc22c1b010d (patch)
tree3011345b2b57841ecb281dc61a5d3e1e754532cd /src/python/include/Persistent_cohomology_interface.h
parent5694670b3e20f0cb935a751614ef12b6009a60c0 (diff)
fix typo + coboundary error
Diffstat (limited to 'src/python/include/Persistent_cohomology_interface.h')
-rw-r--r--src/python/include/Persistent_cohomology_interface.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/python/include/Persistent_cohomology_interface.h b/src/python/include/Persistent_cohomology_interface.h
index acc32b21..0ad14477 100644
--- a/src/python/include/Persistent_cohomology_interface.h
+++ b/src/python/include/Persistent_cohomology_interface.h
@@ -108,7 +108,7 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol
std::vector<int> max_splx; for (auto splx : stptr_->filtration_simplex_range()){ if (stptr_->dimension(splx) == stptr_->dimension()) max_splx.push_back(splx); }
// Sort these simplex handles and compute the ordering function
// This function allows to go directly from the simplex handle to the position of the corresponding top-dimensional cell in the input data
- std::map<int, int> order; std::sort(max_splx.begin(), max_splx.end()); for (int i = 0; i < max_splx.size(); i++) order.insert(std::make_pair(max_splx[i], i));
+ std::map<int, int> order; std::sort(max_splx.begin(), max_splx.end()); for (unsigned int i = 0; i < max_splx.size(); i++) order.insert(std::make_pair(max_splx[i], i));
persistent_cohomology::Persistent_cohomology<FilteredComplex,
persistent_cohomology::Field_Zp>::init_coefficients(homology_coeff_field);
@@ -128,7 +128,7 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol
// Recursively get the top-dimensional cells / cofaces associated to the persistence generator
std::vector<int> faces0; top_dimensional_cofaces(faces0, stptr_->key(get<0>(pair)));
// Find the top-dimensional cell / coface with the same filtration value
- int cf; for (int i = 0; i < faces0.size(); i++){ if (stptr_->filtration(faces0[i]) == f0){cf = i; break;}}
+ int cf; for (unsigned int i = 0; i < faces0.size(); i++){if (stptr_->filtration(faces0[i]) == f0){cf = i; break;}}
// Retrieve the index of the corresponding top-dimensional cell in the input data
int splx0 = order[faces0[cf]];
@@ -138,7 +138,7 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol
// Recursively get the top-dimensional cells / cofaces associated to the persistence generator
std::vector<int> faces1; top_dimensional_cofaces(faces1, stptr_->key(get<1>(pair)));
// Find the top-dimensional cell / coface with the same filtration value
- int cf; for (int i = 0; i < faces0.size(); i++){ if (stptr_->filtration(faces0[i]) == f0){cf = i; break;}}
+ int cf; for (unsigned int i = 0; i < faces1.size(); i++){if (stptr_->filtration(faces1[i]) == f1){cf = i; break;}}
// Retrieve the index of the corresponding top-dimensional cell in the input data
splx1 = order[faces1[cf]];
}