summaryrefslogtreecommitdiff
path: root/src/Witness_complex/include/gudhi/Witness_complex.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-03-18 15:07:43 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-03-18 15:07:43 +0000
commit4b19b4553e909c46b1710fde0bec2b5702e1cb73 (patch)
tree3a3fdc5f85414065a8a80fdf95bbec61761e2746 /src/Witness_complex/include/gudhi/Witness_complex.h
parentb94ae59cf3441a2aa93824e081baa102abf0c286 (diff)
Fix cpplint/cppcheck issues
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@1054 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9f850be55ab0565a2004ba23f6a5098aa227a92a
Diffstat (limited to 'src/Witness_complex/include/gudhi/Witness_complex.h')
-rw-r--r--src/Witness_complex/include/gudhi/Witness_complex.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h
index 60734efe..52f374f3 100644
--- a/src/Witness_complex/include/gudhi/Witness_complex.h
+++ b/src/Witness_complex/include/gudhi/Witness_complex.h
@@ -142,7 +142,7 @@ class Witness_complex {
simplex_vector.push_back(knn[*it][i]);
sc_.insert_simplex(simplex_vector);
// TODO(SK) Error if not inserted : normally no need here though
- it++;
+ ++it;
} else {
active_w.erase(it++); // First increase the iterator and then erase the previous element
}
@@ -196,7 +196,6 @@ class Witness_complex {
// */
template< class KNearestNeighbors >
bool is_witness_complex(KNearestNeighbors const & knn, bool print_output) {
- // bool final_result = true;
for (Simplex_handle sh : sc_.complex_simplex_range()) {
bool is_witnessed = false;
typeVectorVertex simplex;
@@ -209,7 +208,6 @@ class Witness_complex {
for (Vertex_handle v : simplex)
if (std::find(w.begin(), w.begin() + nbV, v) == w.begin() + nbV) {
has_vertices = false;
- // break;
}
if (has_vertices) {
is_witnessed = true;
@@ -244,27 +242,23 @@ class Witness_complex {
* basing on a matrix knn of
* nearest neighbours of the form {witnesses}x{landmarks}.
*
- * The type KNearestNeighbors can be seen as
+ * The type KNearestNeighbors can be seen as
* Witness_range<Closest_landmark_range<Vertex_handle>>, where
* Witness_range and Closest_landmark_range are random access ranges.
*
- * Procedure takes into account at most (dim+1)
+ * Procedure takes into account at most (dim+1)
* first landmarks from each landmark range to construct simplices.
*
* Landmarks are supposed to be in [0,nbL_-1]
*/
-
-
template <class KNearestNeighbors, class SimplicialComplexForWitness>
void witness_complex(KNearestNeighbors const & knn,
int nbL,
int dim,
- SimplicialComplexForWitness & sc)
- {
-
+ SimplicialComplexForWitness & sc) {
Witness_complex<SimplicialComplexForWitness>(knn, nbL, dim, sc);
}
-
+
} // namespace witness_complex
} // namespace Gudhi