Skip to content

Commit 0230e97

Browse files
committed
Merge branch 'CGAL-use_leda-GF-OLD' into CGAL-use_leda-GF
Conflicts: Arrangement_on_surface_2/test/Arrangement_on_surface_2/construction_test_suite_generator.cpp Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_construction.cpp Documentation/doc/Installation.txt Kernel_23/include/CGAL/Exact_predicates_exact_constructions_kernel.h
2 parents 0e46afa + bf39cc5 commit 0230e97

File tree

68 files changed

+408
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+408
-545
lines changed

Arrangement_on_surface_2/test/Arrangement_on_surface_2/construction_test_suite_generator.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11

2-
2+
#include <CGAL/Arithmetic_kernel.h>
33
#include <CGAL/Simple_cartesian.h>
4-
#include <CGAL/MP_Float.h>
5-
#include <CGAL/Quotient.h>
6-
#include <CGAL/Gmpq.h>
74

85
#include <CGAL/Arr_segment_traits_2.h>
96
#include<CGAL/Arr_curve_data_traits_2.h>
@@ -17,21 +14,24 @@
1714

1815
#include "utils.h"
1916

20-
typedef CGAL::Gmpq Number_type;
21-
typedef CGAL::Simple_cartesian<Number_type> Kernel;
22-
typedef CGAL::Arr_segment_traits_2<Kernel> Base_traits;
23-
typedef Base_traits::Curve_2 Base_curve_2;
24-
typedef Base_traits::X_monotone_curve_2 Base_x_monotone_curve_2;
25-
typedef std::plus<unsigned int> Unsigned_plus;
26-
typedef CGAL::Arr_curve_data_traits_2<Base_traits, unsigned int, Unsigned_plus>
27-
Traits_2;
28-
typedef Traits_2::Curve_2 Curve_2;
29-
typedef Traits_2::Point_2 Point_2;
30-
typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2;
31-
typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
32-
typedef Arrangement_2::Vertex_iterator Vertex_iterator;
33-
typedef Arrangement_2::Edge_iterator Edge_iterator;
34-
typedef std::vector<Curve_2> Curve_container;
17+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
18+
typedef CGAL::Simple_cartesian<Number_type> Kernel;
19+
typedef CGAL::Arr_segment_traits_2<Kernel> Base_traits_2;
20+
typedef Base_traits_2::Curve_2 Base_curve_2;
21+
typedef Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2;
22+
typedef CGAL::Arr_curve_data_traits_2<Base_traits_2,
23+
unsigned int,
24+
Unsigned_plus >
25+
Traits_2;
26+
typedef Traits_2::Curve_2 Curve_2;
27+
typedef Traits_2::Point_2 Point_2;
28+
typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2;
29+
typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
30+
typedef Arrangement_2::Vertex_iterator Vertex_iterator;
31+
typedef Arrangement_2::Edge_iterator Edge_iterator;
32+
typedef std::vector<Curve_2> Curve_container;
33+
34+
3535

3636
int main(int argc, char* argv[])
3737
{

Arrangement_on_surface_2/test/Arrangement_on_surface_2/ex_kernel_point.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* kernel-object.
33
*/
44
#include <CGAL/Cartesian.h>
5-
#include <CGAL/Gmpq.h>
5+
#include <CGAL/Arithmetic_kernel.h>
66
#include <CGAL/Arr_non_caching_segment_traits_2.h>
77
#include <CGAL/Arrangement_2.h>
88
#include <iostream>
@@ -116,7 +116,8 @@ struct Ext_seg_kernel :
116116
{};
117117

118118
// The remaining types:
119-
typedef CGAL::Gmpq Number_type;
119+
// leda_rational, or Gmpq, or Quotient<MP_float>
120+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
120121
typedef Ext_seg_kernel<Number_type> Kernel;
121122
typedef CGAL::Arr_non_caching_segment_traits_2<Kernel> Traits;
122123
typedef Traits::Point_2 Point_2;

Arrangement_on_surface_2/test/Arrangement_on_surface_2/ex_kernel_segment.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* kernel-object.
33
*/
44
#include <CGAL/Cartesian.h>
5-
#include <CGAL/Gmpq.h>
5+
#include <CGAL/Arithmetic_kernel.h>
66
#include <CGAL/Arr_non_caching_segment_traits_2.h>
77
#include <CGAL/Arrangement_2.h>
88
#include <iostream>
@@ -93,7 +93,8 @@ struct Ext_seg_kernel :
9393
{};
9494

9595
// The remaining types:
96-
typedef CGAL::Gmpq Number_type;
96+
97+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
9798
typedef Ext_seg_kernel<Number_type> Kernel;
9899
typedef CGAL::Arr_non_caching_segment_traits_2<Kernel> Traits;
99100
typedef Traits::Point_2 Point_2;

Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_dual.cpp

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
#include <CGAL/Arithmetic_kernel.h>
13
#include <CGAL/Cartesian.h>
24
#include <CGAL/Arr_segment_traits_2.h>
35
#include <CGAL/Arr_extended_dcel.h>
@@ -8,22 +10,8 @@
810

911
#include <CGAL/graph_traits_Dual_Arrangement_2.h>
1012

11-
#ifdef CGAL_USE_GMP
12-
13-
// GMP is installed. Use the GMP rational number-type.
14-
#include <CGAL/Gmpq.h>
15-
16-
typedef CGAL::Gmpq Number_type;
17-
18-
#else
19-
20-
// GMP is not installed. Use CGAL's exact rational number-type.
21-
#include <CGAL/MP_Float.h>
22-
#include <CGAL/Quotient.h>
23-
24-
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
25-
26-
#endif
13+
// leda_rational, or Gmpq, or Quotient<MP_float>
14+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
2715

2816
typedef CGAL::Cartesian<Number_type> Kernel;
2917
typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;

Boolean_set_operations_2/test/Boolean_set_operations_2/agg_op_test_suite_generator.cpp

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
#include <CGAL/basic.h>
2-
3-
#ifdef CGAL_USE_GMP
4-
5-
#include <CGAL/Gmpq.h>
6-
7-
typedef CGAL::Gmpq Number_type;
8-
9-
#else
10-
11-
#include <CGAL/MP_Float.h>
12-
#include <CGAL/Quotient.h>
13-
14-
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
15-
16-
#endif
17-
1+
#include <CGAL/Arithmetic_kernel.h>
182
#include <CGAL/Simple_cartesian.h>
193
#include <CGAL/Polygon_2.h>
204
#include <CGAL/Polygon_with_holes_2.h>
@@ -28,6 +12,10 @@
2812
#include <iostream>
2913
#include <fstream>
3014

15+
16+
// leda_rational, or Gmpq, or Quotient<MP_float>
17+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
18+
3119
// instead of
3220
//typedef CGAL::Simple_cartesian<Number_type> Kernel;
3321
// workaround for VC++

Boolean_set_operations_2/test/Boolean_set_operations_2/bop_test_suite_generator.cpp

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
#include <CGAL/basic.h>
2-
3-
#ifdef CGAL_USE_GMP
4-
5-
#include <CGAL/Gmpq.h>
6-
7-
typedef CGAL::Gmpq Number_type;
8-
9-
#else
10-
11-
#include <CGAL/MP_Float.h>
12-
#include <CGAL/Quotient.h>
13-
14-
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
15-
16-
#endif
17-
1+
#include <CGAL/Arithmetic_kernel.h>
182
#include <CGAL/Simple_cartesian.h>
193
#include <CGAL/Polygon_2.h>
204
#include <CGAL/Polygon_with_holes_2.h>
@@ -28,6 +12,10 @@
2812
#include <iostream>
2913
#include <fstream>
3014

15+
16+
// leda_rational, or Gmpq, or Quotient<MP_float>
17+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
18+
3119
// instead of
3220
//typedef CGAL::Simple_cartesian<Number_type> Kernel;
3321
// workaround for VC++

Boolean_set_operations_2/test/Boolean_set_operations_2/test_agg_op.cpp

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1-
#include <CGAL/basic.h>
2-
3-
#ifdef CGAL_USE_GMP
4-
5-
#include <CGAL/Gmpq.h>
6-
7-
typedef CGAL::Gmpq Number_type;
8-
9-
#else
10-
11-
#include <CGAL/MP_Float.h>
12-
#include <CGAL/Quotient.h>
13-
14-
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
15-
16-
#endif
17-
181
#include <string>
2+
3+
#include <CGAL/Arithmetic_kernel.h>
194
#include <CGAL/Simple_cartesian.h>
205
#include <CGAL/Gps_segment_traits_2.h>
216
#include <vector>
@@ -29,6 +14,8 @@
2914
#include <CGAL/General_polygon_set_2.h>
3015
#include <CGAL/Polygon_set_2.h>
3116

17+
// leda_rational, or Gmpq, or Quotient<MP_float>
18+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
3219

3320
// instead of
3421
//typedef CGAL::Simple_cartesian<Number_type> Kernel;

Boolean_set_operations_2/test/Boolean_set_operations_2/test_bop.cpp

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1-
#include <CGAL/basic.h>
2-
3-
#ifdef CGAL_USE_GMP
4-
5-
#include <CGAL/Gmpq.h>
6-
7-
typedef CGAL::Gmpq Number_type;
8-
9-
#else
10-
11-
#include <CGAL/MP_Float.h>
12-
#include <CGAL/Quotient.h>
13-
14-
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
15-
16-
#endif
17-
181
#include <string>
2+
3+
#include <CGAL/Arithmetic_kernel.h>
194
#include <CGAL/Simple_cartesian.h>
205
#include <CGAL/Gps_segment_traits_2.h>
216
#include <vector>
@@ -29,6 +14,10 @@
2914
#include <CGAL/General_polygon_set_2.h>
3015
#include <CGAL/Polygon_set_2.h>
3116

17+
18+
// leda_rational, or Gmpq, or Quotient<MP_float>
19+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
20+
3221
// instead of
3322
//typedef CGAL::Simple_cartesian<Number_type> Kernel;
3423
// workaround for VC++

Boolean_set_operations_2/test/Boolean_set_operations_2/test_connect_holes.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,9 @@
55
#ifndef CGAL_BSO_RATIONAL_NT_H
66
#define CGAL_BSO_RATIONAL_NT_H
77

8-
#include <CGAL/basic.h>
9-
10-
#ifdef CGAL_USE_GMP
11-
// GMP is installed. Use the GMP rational number-type.
12-
#include <CGAL/Gmpq.h>
13-
typedef CGAL::Gmpq Number_type;
14-
#else
15-
// GMP is not installed. Use CGAL's exact rational number-type.
16-
#include <CGAL/MP_Float.h>
17-
#include <CGAL/Quotient.h>
18-
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
19-
#endif
8+
#include <CGAL/Arithmetic_kernel.h>
9+
// leda_rational, or Gmpq, or Quotient<MP_float>
10+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
2011
#endif
2112

2213
#include <CGAL/Cartesian.h>

Boolean_set_operations_2/test/Boolean_set_operations_2/test_polygon_validation.cpp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,7 @@
33
#include <CGAL/basic.h>
44
#include <CGAL/assertions_behaviour.h>
55

6-
#ifdef CGAL_USE_GMP
7-
// GMP is installed. Use the GMP rational number-type.
8-
#include <CGAL/Gmpq.h>
9-
typedef CGAL::Gmpq Number_type;
10-
#else
11-
// GMP is not installed. Use CGAL's exact rational number-type.
12-
#include <CGAL/MP_Float.h>
13-
#include <CGAL/Quotient.h>
14-
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
15-
#endif
16-
17-
6+
#include <CGAL/Arithmetic_kernel.h>
187
#include <CGAL/Cartesian.h>
198
#include <CGAL/Gps_segment_traits_2.h>
209
#include <CGAL/Boolean_set_operations_2.h>
@@ -24,8 +13,10 @@
2413
#include <sstream>
2514
#include <iostream>
2615

16+
// leda_rational, or Gmpq, or Quotient<MP_float>
17+
typedef CGAL::Arithmetic_kernel::Rational Number_type;
2718
typedef CGAL::Cartesian<Number_type> Kernel;
28-
typedef CGAL::Gps_segment_traits_2<Kernel> Traits_2;
19+
typedef CGAL::Gps_segment_traits_2<Kernel> Traits_2;
2920
typedef Traits_2::Polygon_2 Polygon_2;
3021
typedef Traits_2::Polygon_with_holes_2 Polygon_with_holes_2;
3122

@@ -99,7 +90,7 @@ special_warnings(const char *,
9990
<< std::endl;
10091
}
10192

102-
int main ()
93+
int main()
10394
{
10495
std::cerr << "Modify the w-a-r-n-i-n-g-s handler...\n";
10596
CGAL::set_warning_handler(special_warnings);

0 commit comments

Comments
 (0)