summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/example
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-16 12:39:00 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-09-16 12:39:00 +0200
commitcb68f3e4c8ce7724ccb693e5c67dd9928d12d84b (patch)
treec3343bc8ea6b48c3e6727085b4558f71b706ab2c /src/Alpha_complex/example
parentd6f68d20e975e0cd530cd15ca5f7f782550e6af4 (diff)
Some documentation about weighted dD Alpha complex. Make examples 3d/dD consistents
Diffstat (limited to 'src/Alpha_complex/example')
-rw-r--r--src/Alpha_complex/example/Weighted_alpha_complex_3d_from_points.cpp4
-rw-r--r--src/Alpha_complex/example/Weighted_alpha_complex_from_points.cpp16
-rw-r--r--src/Alpha_complex/example/weightedalpha3dfrompoints_for_doc.txt4
3 files changed, 11 insertions, 13 deletions
diff --git a/src/Alpha_complex/example/Weighted_alpha_complex_3d_from_points.cpp b/src/Alpha_complex/example/Weighted_alpha_complex_3d_from_points.cpp
index c044194e..74f0cf30 100644
--- a/src/Alpha_complex/example/Weighted_alpha_complex_3d_from_points.cpp
+++ b/src/Alpha_complex/example/Weighted_alpha_complex_3d_from_points.cpp
@@ -34,10 +34,10 @@ int main(int argc, char **argv) {
// ----------------------------------------------------------------------------
// Display information about the alpha complex
// ----------------------------------------------------------------------------
- std::clog << "Alpha complex is of dimension " << simplex.dimension() << " - " << simplex.num_simplices()
+ std::clog << "Weighted alpha complex is of dimension " << simplex.dimension() << " - " << simplex.num_simplices()
<< " simplices - " << simplex.num_vertices() << " vertices." << std::endl;
- std::clog << "Iterator on alpha complex simplices in the filtration order, with [filtration value]:" << std::endl;
+ std::clog << "Iterator on weighted alpha complex simplices in the filtration order, with [filtration value]:" << std::endl;
for (auto f_simplex : simplex.filtration_simplex_range()) {
std::clog << " ( ";
for (auto vertex : simplex.simplex_vertex_range(f_simplex)) {
diff --git a/src/Alpha_complex/example/Weighted_alpha_complex_from_points.cpp b/src/Alpha_complex/example/Weighted_alpha_complex_from_points.cpp
index 19a04282..d49d3e93 100644
--- a/src/Alpha_complex/example/Weighted_alpha_complex_from_points.cpp
+++ b/src/Alpha_complex/example/Weighted_alpha_complex_from_points.cpp
@@ -8,23 +8,21 @@
#include <vector>
// Explicit dimension 2 Epeck_d kernel
-using Kernel = CGAL::Epeck_d< CGAL::Dimension_tag<2> >;
+using Kernel = CGAL::Epeck_d< CGAL::Dimension_tag<3> >;
using Bare_point = Kernel::Point_d;
using Weighted_point = Kernel::Weighted_point_d;
using Vector_of_points = std::vector<Weighted_point>;
int main() {
// ----------------------------------------------------------------------------
- // Init of a list of points
+ // Init of a list of points and weights from a small molecule
// ----------------------------------------------------------------------------
Vector_of_points points;
- points.push_back(Weighted_point(Bare_point(1.0, 1.0) , 1.));
- points.push_back(Weighted_point(Bare_point(7.0, 0.0) , 1.));
- points.push_back(Weighted_point(Bare_point(4.0, 6.0) , 1.));
- points.push_back(Weighted_point(Bare_point(9.0, 6.0) , 1.));
- points.push_back(Weighted_point(Bare_point(0.0, 14.0), 1.));
- points.push_back(Weighted_point(Bare_point(2.0, 19.0), 1.));
- points.push_back(Weighted_point(Bare_point(9.0, 17.0), 1.));
+ points.push_back(Weighted_point(Bare_point(1, -1, -1), 4.));
+ points.push_back(Weighted_point(Bare_point(-1, 1, -1), 4.));
+ points.push_back(Weighted_point(Bare_point(-1, -1, 1), 4.));
+ points.push_back(Weighted_point(Bare_point(1, 1, 1), 4.));
+ points.push_back(Weighted_point(Bare_point(2, 2, 2), 1.));
// ----------------------------------------------------------------------------
// Init of an alpha complex from the list of points
diff --git a/src/Alpha_complex/example/weightedalpha3dfrompoints_for_doc.txt b/src/Alpha_complex/example/weightedalpha3dfrompoints_for_doc.txt
index 7a09998d..f0695f1a 100644
--- a/src/Alpha_complex/example/weightedalpha3dfrompoints_for_doc.txt
+++ b/src/Alpha_complex/example/weightedalpha3dfrompoints_for_doc.txt
@@ -1,5 +1,5 @@
-Alpha complex is of dimension 3 - 29 simplices - 5 vertices.
-Iterator on alpha complex simplices in the filtration order, with [filtration value]:
+Weighted alpha complex is of dimension 3 - 29 simplices - 5 vertices.
+Iterator on weighted alpha complex simplices in the filtration order, with [filtration value]:
( 0 ) -> [-4]
( 1 ) -> [-4]
( 2 ) -> [-4]