summaryrefslogtreecommitdiff
path: root/src/Persistence_representations/include/gudhi/Persistence_vectors.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-05-31 06:20:04 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-05-31 06:20:04 +0000
commit3a76dcb9f49671b01ae200a13569f47fca57dac0 (patch)
treebafbf8bed128e735682de744640ff4068518038e /src/Persistence_representations/include/gudhi/Persistence_vectors.h
parent93ee566f6ccdaed6bd00e53a3828dd09a97914e8 (diff)
Fix cpplint and cppcheck
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_representation_integration@2480 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9ad6fc7b096fff02a8696515c074ddd92980a8e2
Diffstat (limited to 'src/Persistence_representations/include/gudhi/Persistence_vectors.h')
-rw-r--r--src/Persistence_representations/include/gudhi/Persistence_vectors.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Persistence_representations/include/gudhi/Persistence_vectors.h b/src/Persistence_representations/include/gudhi/Persistence_vectors.h
index 282c107d..ad4d3c57 100644
--- a/src/Persistence_representations/include/gudhi/Persistence_vectors.h
+++ b/src/Persistence_representations/include/gudhi/Persistence_vectors.h
@@ -23,17 +23,19 @@
#ifndef PERSISTENCE_VECTORS_H_
#define PERSISTENCE_VECTORS_H_
+// gudhi include
+#include <gudhi/read_persistence_from_file.h>
+#include <gudhi/common_persistence_representations.h>
+#include <gudhi/distance_functions.h>
+
#include <fstream>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <limits>
#include <functional>
-
-// gudhi include
-#include <gudhi/read_persistence_from_file.h>
-#include <gudhi/common_persistence_representations.h>
-#include <gudhi/distance_functions.h>
+#include <utility>
+#include <vector>
namespace Gudhi {
namespace Persistence_representations {
@@ -66,7 +68,7 @@ class Vector_distances_in_diagram {
/**
* The default constructor.
**/
- Vector_distances_in_diagram(){};
+ Vector_distances_in_diagram(){}
/**
* The constructor that takes as an input a multiset of persistence intervals (given as vector of birth-death
@@ -517,7 +519,7 @@ void Vector_distances_in_diagram<F>::compute_average(const std::vector<Vector_di
}
for (size_t i = 0; i != maximal_length_of_vector; ++i) {
- av[i] /= (double)to_average.size();
+ av[i] /= static_cast<double>(to_average.size());
}
this->sorted_vector_of_distances = av;
this->where_to_cut = av.size();
@@ -611,7 +613,7 @@ void Vector_distances_in_diagram<F>::load_from_file(const char* filename) {
// check if the file exist.
if (!in.good()) {
std::cerr << "The file : " << filename << " do not exist. The program will now terminate \n";
- throw "The file from which you are trying to read the persistence landscape do not exist. The program will now terminate \n";
+ throw "The persistence landscape file do not exist. The program will now terminate \n";
}
double number;