summaryrefslogtreecommitdiff
path: root/src/GudhUI
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/GudhUI
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/GudhUI')
-rw-r--r--src/GudhUI/model/Model.h2
-rw-r--r--src/GudhUI/utils/Bar_code_persistence.h11
-rw-r--r--src/GudhUI/utils/Persistence_compute.h1
-rw-r--r--src/GudhUI/view/FirstCoordProjector.h1
4 files changed, 9 insertions, 6 deletions
diff --git a/src/GudhUI/model/Model.h b/src/GudhUI/model/Model.h
index 99a82eba..1c39c0d7 100644
--- a/src/GudhUI/model/Model.h
+++ b/src/GudhUI/model/Model.h
@@ -71,7 +71,7 @@ class CGAL_geometric_flag_complex_wrapper {
void maximal_face(std::vector<int> vertices) {
if (!load_only_points_) {
- //std::cout << "size:" << vertices.size() << std::endl;
+ // std::cout << "size:" << vertices.size() << std::endl;
for (int i = 0; i < vertices.size(); ++i)
for (int j = i + 1; j < vertices.size(); ++j)
complex_.add_edge(Vertex_handle(vertices[i]), Vertex_handle(vertices[j]));
diff --git a/src/GudhUI/utils/Bar_code_persistence.h b/src/GudhUI/utils/Bar_code_persistence.h
index a4cd8156..b527d684 100644
--- a/src/GudhUI/utils/Bar_code_persistence.h
+++ b/src/GudhUI/utils/Bar_code_persistence.h
@@ -12,6 +12,10 @@
#include <vector>
#include <limits> // NaN, infinity
#include <utility> // for pair
+#include <string>
+
+#ifndef UTILS_BAR_CODE_PERSISTENCE_H_
+#define UTILS_BAR_CODE_PERSISTENCE_H_
class Bar_code_persistence {
private:
@@ -21,7 +25,6 @@ class Bar_code_persistence {
double max_death;
public:
-
Bar_code_persistence()
: min_birth(std::numeric_limits<double>::quiet_NaN()),
max_death(std::numeric_limits<double>::quiet_NaN()) { }
@@ -45,13 +48,13 @@ class Bar_code_persistence {
QGraphicsScene * scene = new QGraphicsScene();
view->setScene(scene);
double ratio = 600.0 / (max_death - min_birth);
- //std::cout << "min_birth=" << min_birth << " - max_death=" << max_death << " - ratio=" << ratio << std::endl;
+ // std::cout << "min_birth=" << min_birth << " - max_death=" << max_death << " - ratio=" << ratio << std::endl;
double height = 0.0, birth = 0.0, death = 0.0;
int pers_num = 1;
for (auto& persistence : persistence_vector) {
height = 5.0 * pers_num;
- //std::cout << "[" << pers_num << "] birth=" << persistence.first << " - death=" << persistence.second << std::endl;
+ // std::cout << "[" << pers_num << "] birth=" << persistence.first << " - death=" << persistence.second << std::endl;
if (std::isfinite(persistence.first))
birth = ((persistence.first - min_birth) * ratio) + 50.0;
else
@@ -83,3 +86,5 @@ class Bar_code_persistence {
view->show();
}
};
+
+#endif // UTILS_BAR_CODE_PERSISTENCE_H_
diff --git a/src/GudhUI/utils/Persistence_compute.h b/src/GudhUI/utils/Persistence_compute.h
index 1f04cc6b..97165490 100644
--- a/src/GudhUI/utils/Persistence_compute.h
+++ b/src/GudhUI/utils/Persistence_compute.h
@@ -85,7 +85,6 @@ template<typename SkBlComplex> class Persistence_compute {
stream << "p dimension birth death: \n";
pcoh.output_diagram(stream);
-
}
};
diff --git a/src/GudhUI/view/FirstCoordProjector.h b/src/GudhUI/view/FirstCoordProjector.h
index 3ceda3f5..a4027b7f 100644
--- a/src/GudhUI/view/FirstCoordProjector.h
+++ b/src/GudhUI/view/FirstCoordProjector.h
@@ -36,7 +36,6 @@ class FirstCoordProjector3D : public Projector3D {
return Point_3(p.x(), p.y(), p.z());
else if (p.dimension() >= 2)
return Point_3(p.x(), p.y(), 0.0);
-
}
};