summaryrefslogtreecommitdiff
path: root/src/Alpha_complex
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-03-16 08:33:04 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-03-16 08:33:04 +0000
commit298c080b45250f2b8f16a0c31ace9bb6fc666c93 (patch)
treeac0148e4263a7ede53138d2dffdff1327acc7501 /src/Alpha_complex
parenta28d3c6ba5ab9687626992cc0402c4399c76ecaf (diff)
CppCheck and CppLint fixes for alpha complexes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@1047 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a9b42ad2f8751384b5227fa3da8f380cda9b3696
Diffstat (limited to 'src/Alpha_complex')
-rw-r--r--src/Alpha_complex/doc/Intro_alpha_complex.h4
-rw-r--r--src/Alpha_complex/example/Alpha_complex_from_off.cpp2
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex.h21
3 files changed, 13 insertions, 14 deletions
diff --git a/src/Alpha_complex/doc/Intro_alpha_complex.h b/src/Alpha_complex/doc/Intro_alpha_complex.h
index deecf93f..f55d7029 100644
--- a/src/Alpha_complex/doc/Intro_alpha_complex.h
+++ b/src/Alpha_complex/doc/Intro_alpha_complex.h
@@ -161,8 +161,8 @@ namespace alphacomplex {
*/
/** @} */ // end defgroup alpha_complex
-} // namespace alphacomplex
+} // namespace alphacomplex
-} // namespace Gudhi
+} // namespace Gudhi
#endif // INTRO_ALPHA_COMPLEX_H_
diff --git a/src/Alpha_complex/example/Alpha_complex_from_off.cpp b/src/Alpha_complex/example/Alpha_complex_from_off.cpp
index 80445a22..18a1a20d 100644
--- a/src/Alpha_complex/example/Alpha_complex_from_off.cpp
+++ b/src/Alpha_complex/example/Alpha_complex_from_off.cpp
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
std::streambuf* streambufffer;
std::ofstream ouput_file_stream;
-
+
if (argc == 4) {
ouput_file_stream.open(std::string(argv[3]));
streambufffer = ouput_file_stream.rdbuf();
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h
index a69afb51..eab66384 100644
--- a/src/Alpha_complex/include/gudhi/Alpha_complex.h
+++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ALPHA_COMPLEX_H_
-#define ALPHA_COMPLEX_H_
+#ifndef DOC_ALPHA_COMPLEX_INTRO_ALPHA_COMPLEX_H_
+#define DOC_ALPHA_COMPLEX_INTRO_ALPHA_COMPLEX_H_
// to construct a simplex_tree from Delaunay_triangulation
#include <gudhi/graph_simplicial_complex.h>
@@ -97,7 +97,6 @@ class Alpha_complex : public Simplex_tree<> {
// Double map type to switch from CGAL vertex iterator to simplex tree vertex handle and vice versa.
typedef typename std::map< CGAL_vertex_iterator, Vertex_handle > Map_vertex_iterator_to_handle;
- //typedef typename std::map< Vertex_handle, CGAL_vertex_iterator > Map_vertex_handle_to_iterator;
typedef typename std::vector< CGAL_vertex_iterator > Vector_vertex_iterator;
private:
@@ -141,7 +140,7 @@ class Alpha_complex : public Simplex_tree<> {
Alpha_complex(Delaunay_triangulation* triangulation_ptr,
Filtration_value max_alpha_square = std::numeric_limits<Filtration_value>::infinity())
: triangulation_(triangulation_ptr) {
- init(max_alpha_square);
+ init(max_alpha_square);
}
/** \brief Alpha_complex constructor from a list of points.
@@ -160,17 +159,17 @@ class Alpha_complex : public Simplex_tree<> {
: triangulation_(nullptr) {
auto first = std::begin(points);
auto last = std::end(points);
-
+
GUDHI_CHECK((first == last),
- std::invalid_argument ("Alpha_complex::Alpha_complex(InputPointRange) - Empty input point range"));
-
+ std::invalid_argument("Alpha_complex::Alpha_complex(InputPointRange) - Empty input point range"));
+
if (first != last) {
// point_dimension function initialization
Point_Dimension point_dimension = kernel_.point_dimension_d_object();
// Delaunay triangulation is point dimension minus one.
triangulation_ = new Delaunay_triangulation(point_dimension(*first) - 1);
-
+
size_type inserted = triangulation_->insert(first, last);
if (inserted != (last -first)) {
std::cerr << "Alpha_complex - insertion failed " << inserted << " != " << (last -first) << "\n";
@@ -227,7 +226,7 @@ class Alpha_complex : public Simplex_tree<> {
}
set_dimension(triangulation_->maximal_dimension());
- // set_filtration to +inf for prune_above_filtration to be done (if necessary)
+ // set_filtration to +inf for prune_above_filtration to be done (if necessary)
set_filtration(std::numeric_limits<Filtration_value>::infinity());
// --------------------------------------------------------------------------------------------
@@ -247,7 +246,7 @@ class Alpha_complex : public Simplex_tree<> {
}
}
// --------------------------------------------------------------------------------------------
-
+
// --------------------------------------------------------------------------------------------
// Simplex_tree construction from loop on triangulation finite full cells list
for (auto cit = triangulation_->finite_full_cells_begin(); cit != triangulation_->finite_full_cells_end(); ++cit) {
@@ -393,4 +392,4 @@ class Alpha_complex : public Simplex_tree<> {
} // namespace Gudhi
-#endif // ALPHA_COMPLEX_H_
+#endif // DOC_ALPHA_COMPLEX_INTRO_ALPHA_COMPLEX_H_