From 921bbab3de7d19f70c2cb68c25fe10c25a47a858 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Tue, 3 Jul 2001 11:51:03 +0000 Subject: [PATCH] - Use Filtered_exact in the demo/examples. --- Packages/Triangulation_3/changes.txt | 3 +++ .../demo/Triangulation_3/demo.C | 13 ++++----- .../demo/Triangulation_3/demo_color.C | 13 ++++----- .../demo/Triangulation_3/demo_voronoi.C | 13 ++++----- .../examples/Triangulation_3/example_color.C | 12 +++------ .../Triangulation_3/example_hierarchy.C | 27 +++++-------------- .../examples/Triangulation_3/example_simple.C | 21 +++------------ 7 files changed, 32 insertions(+), 70 deletions(-) diff --git a/Packages/Triangulation_3/changes.txt b/Packages/Triangulation_3/changes.txt index e2244756a44..0f46e6645cc 100644 --- a/Packages/Triangulation_3/changes.txt +++ b/Packages/Triangulation_3/changes.txt @@ -1,3 +1,6 @@ +Version 1.70 (3 July 01) +- Use Filtered_exact in the demo/examples. + Version 1.69 (3 July 01) - fix in read_cells - cell constructions and deletions done by the TDS only + doc update. diff --git a/Packages/Triangulation_3/demo/Triangulation_3/demo.C b/Packages/Triangulation_3/demo/Triangulation_3/demo.C index a00c14b4070..b3869794143 100644 --- a/Packages/Triangulation_3/demo/Triangulation_3/demo.C +++ b/Packages/Triangulation_3/demo/Triangulation_3/demo.C @@ -34,6 +34,9 @@ int main() #include +#include +#include + #include #include @@ -42,15 +45,9 @@ int main() #include #include -typedef double NT; -// for this simple example, using doubles is ok -// for more complicated examples with degenerate configurations, // using Filtered_exact number type is advised : -// -// #include -// #include -// -// typedef CGAL::Filtered_exact NT; + +typedef CGAL::Filtered_exact NT; typedef CGAL::Cartesian K; diff --git a/Packages/Triangulation_3/demo/Triangulation_3/demo_color.C b/Packages/Triangulation_3/demo/Triangulation_3/demo_color.C index 4e5af26db39..721119b1ea9 100644 --- a/Packages/Triangulation_3/demo/Triangulation_3/demo_color.C +++ b/Packages/Triangulation_3/demo/Triangulation_3/demo_color.C @@ -34,6 +34,9 @@ int main() #include +#include +#include + #include #include @@ -62,15 +65,9 @@ public : {} }; -typedef double NT; -// for this simple example, using doubles is ok -// for more complicated examples with degenerate configurations, // using Filtered_exact number type is advised : -// -// #include -// #include -// -// typedef CGAL::Filtered_exact NT; + +typedef CGAL::Filtered_exact NT; typedef CGAL::Cartesian K; diff --git a/Packages/Triangulation_3/demo/Triangulation_3/demo_voronoi.C b/Packages/Triangulation_3/demo/Triangulation_3/demo_voronoi.C index ce1c533d2fc..a6a54cb7ceb 100644 --- a/Packages/Triangulation_3/demo/Triangulation_3/demo_voronoi.C +++ b/Packages/Triangulation_3/demo/Triangulation_3/demo_voronoi.C @@ -34,6 +34,9 @@ int main() #include +#include +#include + #include #include @@ -42,15 +45,9 @@ int main() #include #include -typedef double NT; -// for this simple example, using doubles is ok -// for more complicated examples with degenerate configurations, // using Filtered_exact number type is advised : -// -// #include -// #include -// -// typedef CGAL::Filtered_exact NT; + +typedef CGAL::Filtered_exact NT; typedef CGAL::Cartesian K; diff --git a/Packages/Triangulation_3/examples/Triangulation_3/example_color.C b/Packages/Triangulation_3/examples/Triangulation_3/example_color.C index 006bafbe4ea..e38910e50fc 100644 --- a/Packages/Triangulation_3/examples/Triangulation_3/example_color.C +++ b/Packages/Triangulation_3/examples/Triangulation_3/example_color.C @@ -2,6 +2,8 @@ #include #include +#include +#include #include @@ -30,15 +32,9 @@ public : {} }; -typedef double NT; -// for this simple example, using doubles is ok -// for more complicated examples with degenerate configurations, // using Filtered_exact number type is advised : -// -// #include -// #include -// -// typedef CGAL::Filtered_exact NT; + +typedef CGAL::Filtered_exact NT; typedef CGAL::Cartesian K; diff --git a/Packages/Triangulation_3/examples/Triangulation_3/example_hierarchy.C b/Packages/Triangulation_3/examples/Triangulation_3/example_hierarchy.C index 79057afa5b0..e1de2f7506b 100644 --- a/Packages/Triangulation_3/examples/Triangulation_3/example_hierarchy.C +++ b/Packages/Triangulation_3/examples/Triangulation_3/example_hierarchy.C @@ -4,40 +4,25 @@ #include #include #include +#include +#include #include #include -////////////////////// -// chosing the number type -////////////////////// - -// for this simple example, using doubles is ok though the points -// are in degenerate configutations, since their coordinates -// are very small integers -// for examples with data stored on a large number of bits, // using Filtered_exact number type is advised : -// -// #include -// #include -// -// typedef CGAL::Filtered_exact NT; -typedef double NT; +typedef CGAL::Filtered_exact NT; -////////////////////// -// chosing the representation (cartesian or homogeneous) -////////////////////// +// chosing the representation (Cartesian or homogeneous) typedef CGAL::Cartesian K; -////////////////////// - -typedef CGAL::Triangulation_vertex_base_3 Vb; +typedef CGAL::Triangulation_vertex_base_3 Vb; typedef CGAL::Triangulation_hierarchy_vertex_base_3 Vbh; typedef CGAL::Triangulation_cell_base_3 Cb; typedef CGAL::Triangulation_data_structure_3 Tds; -typedef CGAL::Delaunay_triangulation_3 Dt; +typedef CGAL::Delaunay_triangulation_3 Dt; typedef CGAL::Triangulation_hierarchy_3
Dh; typedef Dh::Vertex_iterator Vertex_iterator; diff --git a/Packages/Triangulation_3/examples/Triangulation_3/example_simple.C b/Packages/Triangulation_3/examples/Triangulation_3/example_simple.C index 5a91cf856e1..f358e979c3d 100644 --- a/Packages/Triangulation_3/examples/Triangulation_3/example_simple.C +++ b/Packages/Triangulation_3/examples/Triangulation_3/example_simple.C @@ -2,6 +2,8 @@ #include #include +#include +#include #include #include @@ -9,29 +11,14 @@ #include #include -////////////////////// -// chosing the number type -////////////////////// - -// for this simple example, using doubles is ok -// for more complicated examples with degenerate configurations, // using Filtered_exact number type is advised : -// -// #include -// #include -// -// typedef CGAL::Filtered_exact NT; -typedef double NT; +typedef CGAL::Filtered_exact NT; -////////////////////// -// chosing the representation (cartesian or homogeneous) -////////////////////// +// chosing the representation (Cartesian or homogeneous) typedef CGAL::Cartesian K; -////////////////////// - typedef CGAL::Triangulation_3 Triangulation; typedef Triangulation::Cell_handle Cell_handle;