summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-23 09:37:35 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-23 09:37:35 +0000
commit0101a149fc124d62f8a4966654fa30e01f57d424 (patch)
tree934cb37b846b3b7e9e7008c20336b35fe868e426
parent143d7809306d21f120d9177128751a41b8460533 (diff)
Fix cpplints
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alpha_complex_create_complex@1548 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: b8d7d5b4bde8aeec92d6bfc79b8c146c551317c0
-rw-r--r--src/Alpha_complex/concept/Simplicial_complex_for_alpha.h7
-rw-r--r--src/Alpha_complex/example/Alpha_complex_from_off.cpp7
-rw-r--r--src/Alpha_complex/example/Alpha_complex_from_points.cpp2
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex.h6
-rw-r--r--src/Persistent_cohomology/example/alpha_complex_persistence.cpp8
-rw-r--r--src/Persistent_cohomology/example/custom_persistence_sort.cpp14
6 files changed, 22 insertions, 22 deletions
diff --git a/src/Alpha_complex/concept/Simplicial_complex_for_alpha.h b/src/Alpha_complex/concept/Simplicial_complex_for_alpha.h
index 2fd5dc03..384ac2eb 100644
--- a/src/Alpha_complex/concept/Simplicial_complex_for_alpha.h
+++ b/src/Alpha_complex/concept/Simplicial_complex_for_alpha.h
@@ -40,7 +40,7 @@ struct SimplicialComplexForAlpha {
/** Returns the number of vertices in the simplicial complex. */
std::size_t num_vertices();
-
+
/** Gets the simplicial complex dimension. */
int dimension();
@@ -61,10 +61,10 @@ struct SimplicialComplexForAlpha {
/** Browses the simplicial complex to make the filtration non-decreasing. */
void make_filtration_non_decreasing();
-
+
/** Prune the simplicial complex above 'filtration' value given as parameter. */
void prune_above_filtration(Filtration_value filtration);
-
+
/** Sorts the filtration values in the simplicial complex. */
void initialize_filtration();
@@ -88,7 +88,6 @@ struct SimplicialComplexForAlpha {
/** \brief Return type of an insertion of a simplex
*/
typedef unspecified Insertion_result_type;
-
};
} // namespace alpha_complex
diff --git a/src/Alpha_complex/example/Alpha_complex_from_off.cpp b/src/Alpha_complex/example/Alpha_complex_from_off.cpp
index 31f8e10c..32bef1cd 100644
--- a/src/Alpha_complex/example/Alpha_complex_from_off.cpp
+++ b/src/Alpha_complex/example/Alpha_complex_from_off.cpp
@@ -39,15 +39,16 @@ int main(int argc, char **argv) {
Gudhi::Simplex_tree<> simplex;
if (alpha_complex_from_file.create_complex(simplex, alpha_square_max_value)) {
std::ostream output_stream(streambufffer);
-
+
// ----------------------------------------------------------------------------
// Display information about the alpha complex
// ----------------------------------------------------------------------------
output_stream << "Alpha complex is of dimension " << simplex.dimension() <<
" - " << simplex.num_simplices() << " simplices - " <<
simplex.num_vertices() << " vertices." << std::endl;
-
- output_stream << "Iterator on alpha complex simplices in the filtration order, with [filtration value]:" << std::endl;
+
+ output_stream << "Iterator on alpha complex simplices in the filtration order, with [filtration value]:" <<
+ std::endl;
for (auto f_simplex : simplex.filtration_simplex_range()) {
output_stream << " ( ";
for (auto vertex : simplex.simplex_vertex_range(f_simplex)) {
diff --git a/src/Alpha_complex/example/Alpha_complex_from_points.cpp b/src/Alpha_complex/example/Alpha_complex_from_points.cpp
index fa3c1efc..491b7e6d 100644
--- a/src/Alpha_complex/example/Alpha_complex_from_points.cpp
+++ b/src/Alpha_complex/example/Alpha_complex_from_points.cpp
@@ -53,7 +53,7 @@ int main(int argc, char **argv) {
std::cout << "Alpha complex is of dimension " << simplex.dimension() <<
" - " << simplex.num_simplices() << " simplices - " <<
simplex.num_vertices() << " vertices." << std::endl;
-
+
std::cout << "Iterator on alpha complex simplices in the filtration order, with [filtration value]:" << std::endl;
for (auto f_simplex : simplex.filtration_simplex_range()) {
std::cout << " ( ";
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h
index ab96531f..8bb6af1f 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h
@@ -232,7 +232,7 @@ class Alpha_complex {
typedef typename SimplicialComplexForAlpha::Vertex_handle Vertex_handle;
typedef typename SimplicialComplexForAlpha::Simplex_handle Simplex_handle;
typedef std::vector<Vertex_handle> Vector_vertex;
-
+
if (triangulation_ == nullptr) {
std::cerr << "Alpha_complex cannot create_complex from a NULL triangulation\n";
return false; // ----- >>
@@ -249,7 +249,7 @@ class Alpha_complex {
std::cerr << "Alpha_complex create_complex - complex is not empty\n";
return false; // ----- >>
}
-
+
complex.set_dimension(triangulation_->maximal_dimension());
// --------------------------------------------------------------------------------------------
@@ -353,7 +353,7 @@ class Alpha_complex {
#ifdef DEBUG_TRACES
typedef typename SimplicialComplexForAlpha::Vertex_handle Vertex_handle;
#endif // DEBUG_TRACES
-
+
// ### Foreach Tau face of Sigma
for (auto f_boundary : complex.boundary_simplex_range(f_simplex)) {
#ifdef DEBUG_TRACES
diff --git a/src/Persistent_cohomology/example/alpha_complex_persistence.cpp b/src/Persistent_cohomology/example/alpha_complex_persistence.cpp
index 44eda6aa..2412569a 100644
--- a/src/Persistent_cohomology/example/alpha_complex_persistence.cpp
+++ b/src/Persistent_cohomology/example/alpha_complex_persistence.cpp
@@ -42,19 +42,19 @@ int main(int argc, char **argv) {
std::cout << "Simplicial complex is of dimension " << simplex.dimension() <<
" - " << simplex.num_simplices() << " simplices - " <<
simplex.num_vertices() << " vertices." << std::endl;
-
+
// Sort the simplices in the order of the filtration
simplex.initialize_filtration();
-
+
std::cout << "Simplex_tree dim: " << simplex.dimension() << std::endl;
// Compute the persistence diagram of the complex
Gudhi::persistent_cohomology::Persistent_cohomology< Gudhi::Simplex_tree<>,
Gudhi::persistent_cohomology::Field_Zp > pcoh(simplex);
// initializes the coefficient field for homology
pcoh.init_coefficients(coeff_field_characteristic);
-
+
pcoh.compute_persistent_cohomology(min_persistence);
-
+
// Output the diagram in filediag
if (output_file_diag.empty()) {
pcoh.output_diagram();
diff --git a/src/Persistent_cohomology/example/custom_persistence_sort.cpp b/src/Persistent_cohomology/example/custom_persistence_sort.cpp
index 8e254700..64f2a4dc 100644
--- a/src/Persistent_cohomology/example/custom_persistence_sort.cpp
+++ b/src/Persistent_cohomology/example/custom_persistence_sort.cpp
@@ -97,18 +97,18 @@ int main(int argc, char **argv) {
std::cout << "Simplicial complex is of dimension " << simplex.dimension() <<
" - " << simplex.num_simplices() << " simplices - " <<
simplex.num_vertices() << " vertices." << std::endl;
-
+
// Sort the simplices in the order of the filtration
simplex.initialize_filtration();
-
+
std::cout << "Simplex_tree dim: " << simplex.dimension() << std::endl;
-
+
Persistent_cohomology pcoh(simplex);
-
+
// initializes the coefficient field for homology - Z/3Z
pcoh.init_coefficients(3);
pcoh.compute_persistent_cohomology(0.2);
-
+
// Custom sort and output persistence
cmp_intervals_by_dim_then_length cmp(&simplex);
auto persistent_pairs = pcoh.get_persistent_pairs();
@@ -118,13 +118,13 @@ int main(int argc, char **argv) {
<< simplex.filtration(get<0>(pair)) << " "
<< simplex.filtration(get<1>(pair)) << std::endl;
}
-
+
// Persistent Betti numbers
std::cout << "The persistent Betti numbers in interval [0.40, 0.41] are : ";
for (int dim = 0; dim < simplex.dimension(); dim++)
std::cout << "b" << dim << " = " << pcoh.persistent_betti_number(dim, 0.40, 0.41) << " ; ";
std::cout << std::endl;
-
+
// Betti numbers
std::vector<int> betti_numbers = pcoh.betti_numbers();
std::cout << "The Betti numbers are : ";