summaryrefslogtreecommitdiff
path: root/src/python/include/Persistent_cohomology_interface.h
diff options
context:
space:
mode:
authormathieu <mathieu.carriere3@gmail.com>2020-03-11 12:05:15 -0400
committermathieu <mathieu.carriere3@gmail.com>2020-03-11 12:05:15 -0400
commit45b918a17cfa26a0c58d7871b869aa13b0e45019 (patch)
tree9d8021f51dbc96f1c1cd8bba9a31af3b72d3f052 /src/python/include/Persistent_cohomology_interface.h
parent3842ab4cb969db75beb984164a6737ee15be0272 (diff)
moved location of top_dimensional_coface function
Diffstat (limited to 'src/python/include/Persistent_cohomology_interface.h')
-rw-r--r--src/python/include/Persistent_cohomology_interface.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/python/include/Persistent_cohomology_interface.h b/src/python/include/Persistent_cohomology_interface.h
index defac88c..77555349 100644
--- a/src/python/include/Persistent_cohomology_interface.h
+++ b/src/python/include/Persistent_cohomology_interface.h
@@ -72,18 +72,6 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol
return persistence;
}
- int top_dimensional_coface(int splx){
- if (stptr_->dimension(splx) == stptr_->dimension()){return splx;}
- else{
- for (auto v : stptr_->get_coboundary_of_a_cell(splx)){
- if(stptr_->filtration(v) == stptr_->filtration(splx)){
- return top_dimensional_coface(v);
- }
- }
- }
- return splx;
- }
-
std::vector<std::vector<int>> cofaces_of_cubical_persistence_pairs() {
// Warning: this function is meant to be used with CubicalComplex only!!
@@ -104,14 +92,14 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol
for (auto pair : pairs) {
int h = stptr_->dimension(get<0>(pair));
// Recursively get the top-dimensional cell / coface associated to the persistence generator
- int face0 = top_dimensional_coface(get<0>(pair));
+ int face0 = stptr_->get_top_dimensional_coface_of_a_cell(get<0>(pair));
// Retrieve the index of the corresponding top-dimensional cell in the input data
int splx0 = order[face0];
int splx1 = -1;
if (isfinite(stptr_->filtration(get<1>(pair)))){
// Recursively get the top-dimensional cell / coface associated to the persistence generator
- int face1 = top_dimensional_coface(get<1>(pair));
+ int face1 = stptr_->get_top_dimensional_coface_of_a_cell(get<1>(pair));
// Retrieve the index of the corresponding top-dimensional cell in the input data
splx1 = order[face1];
}