summaryrefslogtreecommitdiff
path: root/src/Witness_complex/include/gudhi/Strong_witness_complex.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-01 06:03:29 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-01 06:03:29 +0000
commitfda43b1fde4774909c632a0604ae7ad05a660d3a (patch)
treea88abda1b405b7e0baa56ff8d08d68f4829e7ad4 /src/Witness_complex/include/gudhi/Strong_witness_complex.h
parentd070c2916225acdd928db5929c0cab02589ca8a8 (diff)
Fix cppcheck
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@2122 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 92d11c064056138ce4aa8cbe3a42df29a8a5ca7d
Diffstat (limited to 'src/Witness_complex/include/gudhi/Strong_witness_complex.h')
-rw-r--r--src/Witness_complex/include/gudhi/Strong_witness_complex.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/Witness_complex/include/gudhi/Strong_witness_complex.h b/src/Witness_complex/include/gudhi/Strong_witness_complex.h
index 3fbbb366..6708ac29 100644
--- a/src/Witness_complex/include/gudhi/Strong_witness_complex.h
+++ b/src/Witness_complex/include/gudhi/Strong_witness_complex.h
@@ -79,8 +79,8 @@ class Strong_witness_complex {
* The range of pairs must admit a member type 'iterator'. The dereference type
* of the pair range iterator needs to be 'std::pair<std::size_t, double>'.
*/
- Strong_witness_complex(Nearest_landmark_table_ const & nearest_landmark_table)
- : nearest_landmark_table_(std::begin(nearest_landmark_table), std::end(nearest_landmark_table)) {
+ Strong_witness_complex(Nearest_landmark_table_ const & nearest_landmark_table)
+ : nearest_landmark_table_(std::begin(nearest_landmark_table), std::end(nearest_landmark_table)) {
}
/** \brief Outputs the strong witness complex of relaxation 'max_alpha_square'
@@ -110,7 +110,7 @@ class Strong_witness_complex {
std::cerr << "Strong witness complex cannot create complex - limit dimension must be non-negative.\n";
return false;
}
- for (auto w: nearest_landmark_table_) {
+ for (auto w : nearest_landmark_table_) {
ActiveWitness aw(w);
typeVectorVertex simplex;
typename ActiveWitness::iterator aw_it = aw.begin();
@@ -121,7 +121,7 @@ class Strong_witness_complex {
aw_it++;
}
// continue inserting limD-faces of the following simplices
- typeVectorVertex& vertices = simplex; //'simplex' now will be called vertices
+ typeVectorVertex& vertices = simplex; // 'simplex' now will be called vertices
while (aw_it != aw.end() && aw_it->second < lim_dist2) {
typeVectorVertex facet = {};
add_all_faces_of_dimension(limit_dimension, vertices, vertices.begin(), aw_it,
@@ -153,7 +153,7 @@ class Strong_witness_complex {
if (dim > 0) {
while (curr_it != vertices.end()) {
simplex.push_back(*curr_it);
- ++curr_it;
+ ++curr_it;
add_all_faces_of_dimension(dim-1,
vertices,
curr_it,
@@ -169,14 +169,13 @@ class Strong_witness_complex {
filtration_value,
simplex,
sc);
- }
+ }
} else if (dim == 0) {
simplex.push_back(aw_it->first);
sc.insert_simplex_and_subfaces(simplex, filtration_value);
simplex.pop_back();
- }
- }
-
+ }
+ }
//@}
};