summaryrefslogtreecommitdiff
path: root/src/Witness_complex/include/gudhi/Witness_complex.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-01-21 20:46:10 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-01-21 20:46:10 +0000
commit9ce621289b5061e30329426aef5695ae3e19a099 (patch)
treea0093e2081ef0dadb4c05828c362c9431c49fb04 /src/Witness_complex/include/gudhi/Witness_complex.h
parent6697ad2e4f76e706eae12f5153988691daea1202 (diff)
cpplint/cppcheck fixes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/VR_witness@985 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4dc15b3ab0eecb8d4f5bbb1ac1cb9dabf95233e4
Diffstat (limited to 'src/Witness_complex/include/gudhi/Witness_complex.h')
-rw-r--r--src/Witness_complex/include/gudhi/Witness_complex.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h
index 27f7a9c0..34cbc882 100644
--- a/src/Witness_complex/include/gudhi/Witness_complex.h
+++ b/src/Witness_complex/include/gudhi/Witness_complex.h
@@ -82,7 +82,6 @@ class Witness_complex {
private:
int nbL; // Number of landmarks
- double density; // Desired density
Simplicial_complex& sc; // Simplicial complex
public:
@@ -116,8 +115,6 @@ class Witness_complex {
// Construction of the active witness list
int nbW = knn.size();
typeVectorVertex vv;
- typeSimplex simplex;
- typePairSimplexBool returnValue;
int counter = 0;
/* The list of still useful witnesses
* it will diminuish in the course of iterations
@@ -128,7 +125,7 @@ class Witness_complex {
// by doing it we don't assume that landmarks are necessarily witnesses themselves anymore
counter++;
vv = {i};
- returnValue = sc.insert_simplex(vv);
+ sc.insert_simplex(vv);
// TODO(SK) Error if not inserted : normally no need here though
}
int k = 1; /* current dimension in iterative construction */
@@ -145,7 +142,8 @@ class Witness_complex {
if (ok) {
for (int i = 0; i != k + 1; ++i)
simplex_vector.push_back(knn[*it][i]);
- returnValue = sc.insert_simplex(simplex_vector, 0.0);
+ sc.insert_simplex(simplex_vector, 0.0);
+ // TODO(SK) Error if not inserted : normally no need here though
it++;
} else {
active_w.erase(it++); // First increase the iterator and then erase the previous element
@@ -183,7 +181,7 @@ class Witness_complex {
}
template <typename T>
- void print_vector(const std::vector<T> v) {
+ static void print_vector(const std::vector<T>& v) {
std::cout << "[";
if (!v.empty()) {
std::cout << *(v.begin());