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
This commit is contained in:
Sébastien Loriot 2014-06-18 22:50:06 +02:00
commit 0230e979e2
68 changed files with 406 additions and 543 deletions

View File

@ -1,9 +1,6 @@
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Arr_segment_traits_2.h>
#include<CGAL/Arr_curve_data_traits_2.h>
@ -17,21 +14,24 @@
#include "utils.h"
typedef CGAL::Gmpq Number_type;
typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Arr_segment_traits_2<Kernel> Base_traits;
typedef Base_traits::Curve_2 Base_curve_2;
typedef Base_traits::X_monotone_curve_2 Base_x_monotone_curve_2;
typedef std::plus<unsigned int> Unsigned_plus;
typedef CGAL::Arr_curve_data_traits_2<Base_traits, unsigned int, Unsigned_plus>
Traits_2;
typedef Traits_2::Curve_2 Curve_2;
typedef Traits_2::Point_2 Point_2;
typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2;
typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
typedef Arrangement_2::Vertex_iterator Vertex_iterator;
typedef Arrangement_2::Edge_iterator Edge_iterator;
typedef std::vector<Curve_2> Curve_container;
typedef CGAL::Arithmetic_kernel::Rational Number_type;
typedef CGAL::Simple_cartesian<Number_type> Kernel;
typedef CGAL::Arr_segment_traits_2<Kernel> Base_traits_2;
typedef Base_traits_2::Curve_2 Base_curve_2;
typedef Base_traits_2::X_monotone_curve_2 Base_x_monotone_curve_2;
typedef CGAL::Arr_curve_data_traits_2<Base_traits_2,
unsigned int,
Unsigned_plus >
Traits_2;
typedef Traits_2::Curve_2 Curve_2;
typedef Traits_2::Point_2 Point_2;
typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2;
typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
typedef Arrangement_2::Vertex_iterator Vertex_iterator;
typedef Arrangement_2::Edge_iterator Edge_iterator;
typedef std::vector<Curve_2> Curve_container;
int main(int argc, char* argv[])
{

View File

@ -2,7 +2,7 @@
* kernel-object.
*/
#include <CGAL/Cartesian.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Arr_non_caching_segment_traits_2.h>
#include <CGAL/Arrangement_2.h>
#include <iostream>
@ -116,7 +116,8 @@ struct Ext_seg_kernel :
{};
// The remaining types:
typedef CGAL::Gmpq Number_type;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Number_type;
typedef Ext_seg_kernel<Number_type> Kernel;
typedef CGAL::Arr_non_caching_segment_traits_2<Kernel> Traits;
typedef Traits::Point_2 Point_2;

View File

@ -2,7 +2,7 @@
* kernel-object.
*/
#include <CGAL/Cartesian.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Arr_non_caching_segment_traits_2.h>
#include <CGAL/Arrangement_2.h>
#include <iostream>
@ -93,7 +93,8 @@ struct Ext_seg_kernel :
{};
// The remaining types:
typedef CGAL::Gmpq Number_type;
typedef CGAL::Arithmetic_kernel::Rational Number_type;
typedef Ext_seg_kernel<Number_type> Kernel;
typedef CGAL::Arr_non_caching_segment_traits_2<Kernel> Traits;
typedef Traits::Point_2 Point_2;

View File

@ -1,3 +1,5 @@
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/Arr_extended_dcel.h>
@ -8,22 +10,8 @@
#include <CGAL/graph_traits_Dual_Arrangement_2.h>
#ifdef CGAL_USE_GMP
// GMP is installed. Use the GMP rational number-type.
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
// GMP is not installed. Use CGAL's exact rational number-type.
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Number_type;
typedef CGAL::Cartesian<Number_type> Kernel;
typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;

View File

@ -1,20 +1,4 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h>
@ -28,6 +12,10 @@
#include <iostream>
#include <fstream>
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Number_type;
// instead of
//typedef CGAL::Simple_cartesian<Number_type> Kernel;
// workaround for VC++

View File

@ -1,20 +1,4 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h>
@ -28,6 +12,10 @@
#include <iostream>
#include <fstream>
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Number_type;
// instead of
//typedef CGAL::Simple_cartesian<Number_type> Kernel;
// workaround for VC++

View File

@ -1,21 +1,6 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <string>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Gps_segment_traits_2.h>
#include <vector>
@ -29,6 +14,8 @@
#include <CGAL/General_polygon_set_2.h>
#include <CGAL/Polygon_set_2.h>
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Number_type;
// instead of
//typedef CGAL::Simple_cartesian<Number_type> Kernel;

View File

@ -1,21 +1,6 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <string>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Gps_segment_traits_2.h>
#include <vector>
@ -29,6 +14,10 @@
#include <CGAL/General_polygon_set_2.h>
#include <CGAL/Polygon_set_2.h>
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Number_type;
// instead of
//typedef CGAL::Simple_cartesian<Number_type> Kernel;
// workaround for VC++

View File

@ -5,18 +5,9 @@
#ifndef CGAL_BSO_RATIONAL_NT_H
#define CGAL_BSO_RATIONAL_NT_H
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
// GMP is installed. Use the GMP rational number-type.
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
// GMP is not installed. Use CGAL's exact rational number-type.
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <CGAL/Arithmetic_kernel.h>
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Number_type;
#endif
#include <CGAL/Cartesian.h>

View File

@ -3,18 +3,7 @@
#include <CGAL/basic.h>
#include <CGAL/assertions_behaviour.h>
#ifdef CGAL_USE_GMP
// GMP is installed. Use the GMP rational number-type.
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Number_type;
#else
// GMP is not installed. Use CGAL's exact rational number-type.
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;
#endif
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Gps_segment_traits_2.h>
#include <CGAL/Boolean_set_operations_2.h>
@ -24,8 +13,10 @@
#include <sstream>
#include <iostream>
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Number_type;
typedef CGAL::Cartesian<Number_type> Kernel;
typedef CGAL::Gps_segment_traits_2<Kernel> Traits_2;
typedef CGAL::Gps_segment_traits_2<Kernel> Traits_2;
typedef Traits_2::Polygon_2 Polygon_2;
typedef Traits_2::Polygon_with_holes_2 Polygon_with_holes_2;
@ -99,7 +90,7 @@ special_warnings(const char *,
<< std::endl;
}
int main ()
int main()
{
std::cerr << "Modify the w-a-r-n-i-n-g-s handler...\n";
CGAL::set_warning_handler(special_warnings);

View File

@ -5,7 +5,7 @@
#include <CGAL/basic.h>
#include <CGAL/Min_sphere_of_spheres_d.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Arithmetic_kernel.h>
#include <iostream>
#include <vector>
@ -13,8 +13,8 @@
#include <cstdlib>
// The program will work with numbers of type FieldType.
// You can change FieldType to leda_real, for instance.
typedef CGAL::Gmpq FieldType;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational FieldType;
template<typename FT>
CGAL::Tag_true get_is_exact_tag(const FT&) {

View File

@ -10,15 +10,16 @@
#include <CGAL/basic.h>
#include <CGAL/Cartesian_d.h>
#include <CGAL/Min_sphere_of_spheres_d.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Arithmetic_kernel.h>
#include <iostream>
#include <vector>
#include <ctime>
// The program will work with numbers of type FieldType.
// You can change FieldType to leda_real, for instance.
typedef CGAL::Gmpq FieldType;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational FieldType;
class Ball {
private: // representation:
@ -60,8 +61,8 @@ struct BallTraits {
};
double to_double(const std::pair<FieldType,FieldType>& p,const FieldType& disc) {
return to_double(p.first)+to_double(p.second)*
std::sqrt(to_double(disc));
return CGAL::to_double(p.first)+CGAL::to_double(p.second)*
std::sqrt(CGAL::to_double(disc));
}
double uniform() { // a (platform independent) random number generator

View File

@ -30,6 +30,7 @@
#include<CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Random.h>
#include <CGAL/Cartesian_d.h>
#include <CGAL/Homogeneous_d.h>
@ -37,11 +38,11 @@
#include <cassert>
#include <CGAL/Min_sphere_annulus_d_traits_d.h>
#include <CGAL/Min_sphere_d.h>
#include <CGAL/Gmpq.h>
using namespace CGAL;
typedef Gmpq NT;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational NT;
typedef NT FT;
typedef NT RT;
typedef Cartesian_d<FT> C;

View File

@ -39,11 +39,12 @@
#include<CGAL/Min_sphere_d.h>
#include<CGAL/Min_circle_2.h>
#include<CGAL/Min_circle_2_traits_2.h> //why is this not in Min_circle_2.h
#include<CGAL/Gmpq.h>
#include <CGAL/Arithmetic_kernel.h>
using namespace CGAL;
typedef Gmpq NT;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational NT;
typedef NT FT;
typedef NT RT;
typedef Cartesian<FT> C;

View File

@ -25,23 +25,20 @@
// implementation: dD Smallest Enclosing Sphere
// ============================================================================
// hack to overcome external linkage conflict warning in MIPS
#define __SGI_STL_INTERNAL_RELOPS
#include <CGAL/basic.h>
// only do something if LEDA available
#include <cassert>
#include <CGAL/Arithmetic_kernel.h>
#include<CGAL/Random.h>
#include<CGAL/Cartesian.h>
#include<CGAL/Homogeneous.h>
#include<CGAL/Min_sphere_annulus_d_traits_3.h>
#include<CGAL/Min_sphere_d.h>
#include<CGAL/Gmpq.h>
#include <cassert>
using namespace CGAL;
typedef Gmpq NT;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational NT;
typedef NT FT;
typedef NT RT;
typedef Cartesian<FT> C;

View File

@ -25,6 +25,7 @@
// implementation: test program for 2D Smallest Enclosing Circle
// ============================================================================
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Min_circle_2.h>
@ -37,15 +38,8 @@
#include <cstring>
#include <fstream>
#ifdef CGAL_USE_LEDA_FOR_OPTIMISATION_TEST
# include <CGAL/leda_integer.h>
typedef leda_integer Rt;
typedef CGAL::Quotient< leda_integer > Ft;
#else
# include <CGAL/Gmpz.h>
typedef CGAL::Gmpz Rt;
typedef CGAL::Quotient< CGAL::Gmpz > Ft;
#endif
typedef CGAL::Arithmetic_kernel::Integer Rt;
typedef CGAL::Quotient< Rt > Ft;
typedef CGAL::Cartesian< Ft > KerC;
typedef CGAL::Homogeneous< Rt > KerH;

View File

@ -25,6 +25,7 @@
// implementation: test program for 2D Smallest Enclosing Ellipse
// ============================================================================
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Min_ellipse_2.h>
@ -37,15 +38,11 @@
#include <cstring>
#include <fstream>
#ifdef CGAL_USE_LEDA_FOR_OPTIMISATION_TEST
# include <CGAL/leda_integer.h>
typedef leda_integer Rt;
typedef CGAL::Quotient< leda_integer > Ft;
#else
# include <CGAL/Gmpz.h>
typedef CGAL::Gmpz Rt;
typedef CGAL::Quotient< CGAL::Gmpz > Ft;
#endif
typedef CGAL::Arithmetic_kernel::Integer Rt;
typedef CGAL::Quotient< Rt > Ft;
#ifdef CGAL_USE_CORE
#include <CGAL/CORE_Expr.h>

View File

@ -184,8 +184,8 @@ namespace CartesianKernelFunctors {
operator()( const Circle_2& c, const Point_2& p) const
{
typename K::Compute_squared_distance_2 squared_distance;
return enum_cast<Bounded_side>(CGAL_NTS compare(c.squared_radius(),
squared_distance(c.center(),p)));
return enum_cast<Bounded_side>(CGAL::compare(c.squared_radius(),
squared_distance(c.center(),p)));
}
result_type
@ -447,14 +447,14 @@ namespace CartesianKernelFunctors {
result_type
operator()(const T1& p, const T2& q, const T3& r) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(p, r));
return CGAL::compare(squared_distance(p, q), squared_distance(p, r));
}
template <class T1, class T2, class T3, class T4>
result_type
operator()(const T1& p, const T2& q, const T3& r, const T4& s) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(r, s));
return CGAL::compare(squared_distance(p, q), squared_distance(r, s));
}
};
@ -477,14 +477,14 @@ namespace CartesianKernelFunctors {
result_type
operator()(const T1& p, const T2& q, const T3& r) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(p, r));
return CGAL::compare(squared_distance(p, q), squared_distance(p, r));
}
template <class T1, class T2, class T3, class T4>
result_type
operator()(const T1& p, const T2& q, const T3& r, const T4& s) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(r, s));
return CGAL::compare(squared_distance(p, q), squared_distance(r, s));
}
};
@ -499,28 +499,28 @@ namespace CartesianKernelFunctors {
result_type
operator()(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const FT& ft) const
{
return CGAL_NTS compare(squared_radiusC3(p.x(), p.y(), p.z(),
q.x(), q.y(), q.z(),
r.x(), r.y(), r.z(),
s.x(), s.y(), s.z() ),
ft);
return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(),
q.x(), q.y(), q.z(),
r.x(), r.y(), r.z(),
s.x(), s.y(), s.z() ),
ft);
}
result_type
operator()(const Point_3& p, const Point_3& q, const Point_3& r, const FT& ft) const
{
return CGAL_NTS compare(squared_radiusC3(p.x(), p.y(), p.z(),
q.x(), q.y(), q.z(),
r.x(), r.y(), r.z()),
ft);
return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(),
q.x(), q.y(), q.z(),
r.x(), r.y(), r.z()),
ft);
}
result_type
operator()(const Point_3& p, const Point_3& q, const FT& ft) const
{
return CGAL_NTS compare(squared_radiusC3(p.x(), p.y(), p.z(),
q.x(), q.y(), q.z() ),
ft);
return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(),
q.x(), q.y(), q.z() ),
ft);
}
result_type
@ -640,7 +640,7 @@ namespace CartesianKernelFunctors {
result_type
operator()( const Point_2& p, const Point_2& q) const
{ return CGAL_NTS compare(p.x(), q.x()); }
{ return CGAL::compare(p.x(), q.x()); }
result_type
operator()( const Point_2& p, const Line_2& l, const Line_2& h) const
@ -671,7 +671,7 @@ namespace CartesianKernelFunctors {
result_type
operator()( const Point_3& p, const Point_3& q) const
{ return CGAL_NTS compare(p.x(), q.x()); }
{ return CGAL::compare(p.x(), q.x()); }
};
template <typename K>
@ -751,7 +751,7 @@ namespace CartesianKernelFunctors {
result_type
operator()( const Point_2& p, const Point_2& q) const
{ return CGAL_NTS compare(p.y(), q.y()); }
{ return CGAL::compare(p.y(), q.y()); }
result_type
operator()( const Point_2& p, const Line_2& l1, const Line_2& l2) const
@ -786,7 +786,7 @@ namespace CartesianKernelFunctors {
result_type
operator()( const Point_3& p, const Point_3& q) const
{ return CGAL_NTS compare(p.y(), q.y()); }
{ return CGAL::compare(p.y(), q.y()); }
};
template <typename K>
@ -798,7 +798,7 @@ namespace CartesianKernelFunctors {
result_type
operator()( const Point_3& p, const Point_3& q) const
{ return CGAL_NTS compare(p.z(), q.z()); }
{ return CGAL::compare(p.z(), q.z()); }
};
template <class K>

View File

@ -1,4 +1,4 @@
#include<CGAL/Gmpz.h>
#include <CGAL/Arithmetic_kernel.h>
#include<CGAL/Homogeneous.h>
#include<CGAL/Nef_polyhedron_3.h>
#include<CGAL/IO/Nef_polyhedron_iostream_3.h>
@ -8,7 +8,7 @@
#include<CGAL/Nef_3/SNC_indexed_items.h>
#include<fstream>
typedef CGAL::Gmpz RT;
typedef CGAL::Arithmetic_kernel::Integer RT;
typedef CGAL::Homogeneous<RT> Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron_3;
//typedef CGAL::Nef_polyhedron_3<Kernel, CGAL::SNC_indexed_items> Nef_polyhedron_3;

View File

@ -1,8 +1,8 @@
#include<CGAL/Gmpz.h>
#include <CGAL/Arithmetic_kernel.h>
#include<CGAL/Homogeneous.h>
#include<CGAL/Convex_decomposition_3/Edge_sorter.h>
typedef CGAL::Gmpz RT;
typedef CGAL::Arithmetic_kernel::Integer RT;
typedef CGAL::Homogeneous<RT> Kernel;
typedef Kernel::Point_3 Point_3;
typedef Kernel::FT FT;

View File

@ -1,5 +1,5 @@
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Gmpz.h>
#include <CGAL/Nef_S2/Sphere_point.h>
#include <CGAL/Nef_S2/Sphere_circle.h>
#include <CGAL/Nef_S2/Sphere_segment.h>
@ -60,7 +60,8 @@ int main()
// CGAL_NEF_SETDTHREAD(239);
typedef CGAL::Homogeneous<CGAL::Gmpz> Kernel;
typedef CGAL::Arithmetic_kernel::Integer RT;
typedef CGAL::Homogeneous<RT> Kernel;
typedef Test_SNC<Kernel> SNC;
typedef SNC::Point_3 Point_3;
typedef SNC::Sphere_point Sphere_point;

View File

@ -1,3 +1,4 @@
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
@ -7,18 +8,9 @@
#include <CGAL/assertions.h>
#include <boost/type_traits.hpp>
#ifdef CGAL_USE_LEDA
# include <CGAL/leda_rational.h>
typedef leda_rational Precise_rational;
#elif defined CGAL_USE_GMP
# include <CGAL/Gmpz.h>
# include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::Gmpz> Precise_rational;
#else
# include <CGAL/MP_Float.h>
# include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Precise_rational;
#endif
typedef CGAL::Arithmetic_kernel::Rational Precise_rational;
typedef CGAL::Exact_predicates_exact_constructions_kernel EPEC;
typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;

View File

@ -1,4 +1,4 @@
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <fstream>
@ -9,20 +9,8 @@
#include <CGAL/point_generators_3.h>
#include <cassert>
#ifdef CGAL_USE_LEDA
# include <CGAL/leda_rational.h>
typedef leda_rational Precise_rational;
#elif defined CGAL_USE_GMP
# include <CGAL/Gmpz.h>
# include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::Gmpz> Precise_rational;
#else
# include <CGAL/MP_Float.h>
# include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Precise_rational;
#endif
typedef CGAL::Arithmetic_kernel::Rational Precise_rational;
typedef CGAL::Cartesian< Precise_rational > R;
typedef CGAL::Convex_hull_traits_3<R> Traits;
typedef Traits::Polyhedron_3 Polyhedron_3;

View File

@ -1,3 +1,4 @@
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Convex_hull_traits_3.h>
@ -6,21 +7,8 @@
#include <CGAL/point_generators_3.h>
#include <vector>
#include <cassert>
#ifdef CGAL_USE_LEDA
# include <CGAL/leda_rational.h>
typedef leda_rational Precise_rational;
#elif defined CGAL_USE_GMP
# include <CGAL/Gmpz.h>
# include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::Gmpz> Precise_rational;
#else
# include <CGAL/MP_Float.h>
# include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Precise_rational;
#endif
typedef Precise_rational NT;
typedef CGAL::Arithmetic_kernel::Rational NT;
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Convex_hull_traits_3<K> Traits;
typedef Traits::Polyhedron_3 Polyhedron_3;

View File

@ -1163,7 +1163,7 @@ usage of \sc{Gmp} and of \sc{Mpfr} will be disabled.
| Variable | Description | Type |
| :- | :- | :- |
| `WITH_GMP` | Indicates whether to search and use \sc{Gmp}/\sc{Mpfr} or not | CMake |
| `CGAL_DISABLE_GMP` | Indicates whether to search and use \sc{Gmp}/\sc{Mpfr} or not | CMake |
| `GMP_DIR` | Directory of \sc{Gmp} default installation | Environment |
| `GMP_INCLUDE_DIR` | Directory containing the `gmp.h` file | CMake |
| `GMP_INC_DIR` | Idem | Environment |

View File

@ -1,16 +1,4 @@
#include <CGAL/basic.h>
#ifdef CGAL_USE_GMP
// GMP is installed. Use the GMP rational number-type.
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq NT;
#else
// GMP is not installed. Use CGAL's exact rational number-type.
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> NT;
#endif
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/Arr_curve_data_traits_2.h>
@ -23,6 +11,8 @@
using std::strcmp;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational NT;
typedef CGAL::Cartesian<NT> Kernel;
typedef CGAL::Arr_segment_traits_2<Kernel> Segment_traits_2;
typedef CGAL::Arr_curve_data_traits_2<Segment_traits_2,

View File

@ -1,6 +1,5 @@
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Timer.h>
#include <CGAL/Env_triangle_traits_3.h>
@ -14,7 +13,8 @@
#include <vector>
#include <map>
typedef CGAL::Gmpq NT;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational NT;
typedef CGAL::Cartesian<NT> Kernel;
typedef Kernel::Point_3 Point_3;

View File

@ -127,8 +127,8 @@ namespace HomogeneousKernelFunctors {
operator()( const Circle_2& c, const Point_2& p) const
{
typename K::Compute_squared_distance_2 squared_distance;
return enum_cast<Bounded_side>(CGAL_NTS compare(c.squared_radius(),
squared_distance(c.center(),p)));
return enum_cast<Bounded_side>(CGAL::compare(c.squared_radius(),
squared_distance(c.center(),p)));
}
result_type
@ -676,14 +676,14 @@ namespace HomogeneousKernelFunctors {
result_type
operator()(const T1& p, const T2& q, const T3& r) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(p, r));
return CGAL::compare(squared_distance(p, q), squared_distance(p, r));
}
template <class T1, class T2, class T3, class T4>
result_type
operator()(const T1& p, const T2& q, const T3& r, const T4& s) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(r, s));
return CGAL::compare(squared_distance(p, q), squared_distance(r, s));
}
};
@ -729,14 +729,14 @@ namespace HomogeneousKernelFunctors {
result_type
operator()(const T1& p, const T2& q, const T3& r) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(p, r));
return CGAL::compare(squared_distance(p, q), squared_distance(p, r));
}
template <class T1, class T2, class T3, class T4>
result_type
operator()(const T1& p, const T2& q, const T3& r, const T4& s) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(r, s));
return CGAL::compare(squared_distance(p, q), squared_distance(r, s));
}
};
@ -766,11 +766,11 @@ namespace HomogeneousKernelFunctors {
if (l1_sign > l2_sign) return LARGER;
if (l1_sign > 0)
return CGAL_NTS compare( CGAL_NTS abs(l1.a() * l2.b()),
CGAL_NTS abs(l2.a() * l1.b()) );
return CGAL::compare( CGAL::abs(l1.a() * l2.b()),
CGAL::abs(l2.a() * l1.b()) );
return CGAL_NTS compare( CGAL_NTS abs(l2.a() * l1.b()),
CGAL_NTS abs(l1.a() * l2.b()) );
return CGAL::compare( CGAL::abs(l2.a() * l1.b()),
CGAL::abs(l1.a() * l2.b()) );
} // FIXME
result_type
@ -855,7 +855,7 @@ namespace HomogeneousKernelFunctors {
result_type
operator()( const Point_2& p, const Line_2& h1, const Line_2& h2) const
{ return CGAL_NTS compare(h1.x_at_y( p.y() ), h2.x_at_y( p.y() )); }
{ return CGAL::compare(h1.x_at_y( p.y() ), h2.x_at_y( p.y() )); }
// FIXME
result_type
@ -905,7 +905,7 @@ namespace HomogeneousKernelFunctors {
// same x and y
pV = p.hz()*q.hw();
qV = q.hz()*p.hw();
return CGAL_NTS compare(pV, qV);
return CGAL::compare(pV, qV);
}
};
@ -935,7 +935,7 @@ namespace HomogeneousKernelFunctors {
pV = phy*qhw;
qV = qhy*phw;
}
return CGAL_NTS compare(pV, qV);
return CGAL::compare(pV, qV);
}
};
@ -965,7 +965,7 @@ namespace HomogeneousKernelFunctors {
pV = phx*qhw;
qV = qhx*phw;
}
return CGAL_NTS compare(pV, qV);
return CGAL::compare(pV, qV);
}
};
@ -993,7 +993,7 @@ namespace HomogeneousKernelFunctors {
// same x
pV = p.hy()*q.hw();
qV = q.hy()*p.hw();
return CGAL_NTS compare(pV, qV);
return CGAL::compare(pV, qV);
}
};
@ -1008,7 +1008,7 @@ namespace HomogeneousKernelFunctors {
result_type
operator()( const Point_2& p, const Point_2& q) const
{
return CGAL_NTS compare(p.hx()*q.hw(), q.hx()*p.hw());
return CGAL::compare(p.hx()*q.hw(), q.hx()*p.hw());
}
result_type
@ -1043,7 +1043,7 @@ namespace HomogeneousKernelFunctors {
result_type
operator()( const Point_3& p, const Point_3& q) const
{ return CGAL_NTS compare(p.hx() * q.hw(), q.hx() * p.hw() ); }
{ return CGAL::compare(p.hx() * q.hw(), q.hx() * p.hw() ); }
};
template <typename K>
@ -1067,7 +1067,7 @@ namespace HomogeneousKernelFunctors {
result_type
operator()( const Point_2& p, const Line_2& h1, const Line_2& h2) const
{ return CGAL_NTS compare(h1.y_at_x( p.x() ), h2.y_at_x( p.x() )); }
{ return CGAL::compare(h1.y_at_x( p.x() ), h2.y_at_x( p.x() )); }
// FIXME
result_type
@ -1140,11 +1140,11 @@ namespace HomogeneousKernelFunctors {
FT s1stx = s1sx-s1tx;
FT s2stx = s2sx-s2tx;
return CGAL_NTS compare(s1sx, s1tx) *
CGAL_NTS compare(s2sx, s2tx) *
CGAL_NTS compare(-(s1sx-px)*(s1sy-s1ty)*s2stx,
(s2sy-s1sy)*s2stx*s1stx
-(s2sx-px)*(s2sy-s2ty)*s1stx);
return CGAL::compare(s1sx, s1tx) *
CGAL::compare(s2sx, s2tx) *
CGAL::compare(-(s1sx-px)*(s1sy-s1ty)*s2stx,
(s2sy-s1sy)*s2stx*s1stx
-(s2sx-px)*(s2sy-s2ty)*s1stx);
}
else {
if (s1sx == s1tx) { // s1 is vertical
@ -1183,7 +1183,7 @@ namespace HomogeneousKernelFunctors {
const RT& phw = p.hw();
const RT& qhy = q.hy();
const RT& qhw = q.hw();
return CGAL_NTS compare(phy * qhw, qhy * phw);
return CGAL::compare(phy * qhw, qhy * phw);
}
result_type
@ -1218,7 +1218,7 @@ namespace HomogeneousKernelFunctors {
result_type
operator()( const Point_3& p, const Point_3& q) const
{ return CGAL_NTS compare(p.hy() * q.hw(), q.hy() * p.hw() ); }
{ return CGAL::compare(p.hy() * q.hw(), q.hy() * p.hw() ); }
};
template <typename K>
@ -1230,7 +1230,7 @@ namespace HomogeneousKernelFunctors {
result_type
operator()( const Point_3& p, const Point_3& q) const
{ return CGAL_NTS compare(p.hz() * q.hw(), q.hz() * p.hw() ); }
{ return CGAL::compare(p.hz() * q.hw(), q.hz() * p.hw() ); }
};
template <typename K>
@ -4197,7 +4197,7 @@ namespace HomogeneousKernelFunctors {
RT C = qhx*rhw - qhw*rhx;
RT D = qhy*rhw - qhw*rhy;
return CGAL_NTS compare(A*D, B*C);
return CGAL::compare(A*D, B*C);
}
result_type
@ -4330,8 +4330,8 @@ namespace HomogeneousKernelFunctors {
const RT& thw = t.hw();
return enum_cast<Bounded_side>(
CGAL_NTS compare((thx*phw-phx*thw)*(qhx*thw-thx*qhw),
(thy*phw-phy*thw)*(thy*qhw-qhy*thw)) );
CGAL::compare((thx*phw-phx*thw)*(qhx*thw-thx*qhw),
(thy*phw-phy*thw)*(thy*qhw-qhy*thw)) );
}
result_type

View File

@ -534,7 +534,32 @@ set_special_prefix(QGLViewer QGLVIEWER)
set_special_prefix(Coin3D COIN3D)
# some libraries are essential (stl and Boost.Thread are treated in another way)
list (INSERT CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES 0 GMP MPFR)
if("$ENV{CGAL_DISABLE_GMP}" OR CGAL_DISABLE_GMP)
list(LENGTH CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES CGAL_ESSENTIAL_LENGTH)
if(NOT CGAL_ESSENTIAL_LENGTH EQUAL 0)
list(REMOVE_ITEM CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES GMP MPFR)
endif()
unset(CGAL_CONFIGURED_LIBRARIES)
unset(CGAL_CONFIGURED_LIBRARIES CACHE)
unset(GMP_FOUND)
unset(GMP_FOUND CACHE)
unset(GMPXX_FOUND)
unset(GMPXX_FOUND CACHE)
unset(MPFR_FOUND)
unset(MPFR_FOUND CACHE)
unset(WITH_CGAL_Core)
unset(WITH_CGAL_Core CACHE)
unset(WITH_GMP)
unset(WITH_GMP CACHE)
unset(WITH_GMPXX)
unset(WITH_GMPXX CACHE)
unset(WITH_MPFR)
unset(WITH_MPFR CACHE)
else()
list(APPEND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES GMP MPFR)
# Where CMake is run several times, to avoid duplicates
list (REMOVE_DUPLICATES CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES)
endif()
hide_variable(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES)
foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})

View File

@ -369,11 +369,17 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
use_component( MPFI )
endif()
use_component( MPFR )
if(MPFR_FOUND)
use_component( MPFR )
endif()
if (GMPXX_FOUND)
use_component( GMPXX )
endif()
use_component( GMP )
if(GMP_FOUND)
use_component( GMP )
endif()
if(LEDA_FOUND)
use_component( LEDA )

View File

@ -56,7 +56,7 @@ foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})
if (${lib} STREQUAL "LEDA")
# special case for LEDA - add a flag
message( STATUS "$LEDA cxx flags: ${LEDA_CXX_FLAGS}" )
message( STATUS "LEDA cxx flags: ${LEDA_CXX_FLAGS}" )
uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} )
endif()

View File

@ -12,14 +12,14 @@ else()
DOC "The directory containing the LEDA header files WITHOUT the LEDA prefix"
)
find_library(LEDA_LIBRARY_RELEASE NAMES "leda"
find_library(LEDA_LIBRARY_RELEASE NAMES "leda_md" "leda"
HINTS ENV LEDA_LIB_DIR
ENV LEDA_DIR
# PATH_SUFFIXES lib
DOC "Path to the LEDA library"
)
find_library(LEDA_LIBRARY_DEBUG NAMES "ledaD"
find_library(LEDA_LIBRARY_DEBUG NAMES "leda_mdd" "ledaD"
HINTS ENV LEDA_LIB_DIR
ENV LEDA_DIR
# PATH_SUFFIXES lib

View File

@ -128,8 +128,7 @@ foreach(package ${CGAL_CONFIGURED_PACKAGES})
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS "" )
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES "" )
cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS "" )
if (${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "Core")
if (${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL_Core")
if (NOT CGAL_NO_CORE)
configure_component( ${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} ${CGAL_CONFIGURED_LIBRARY_NAME})
else(NOT CGAL_NO_CORE)

View File

@ -26,7 +26,10 @@
#if defined(BOOST_MSVC)
# pragma warning(disable:4244) // int to float conversion warning
#endif
#include <CGAL/Arithmetic_kernel.h>
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Rational;
#include <CGAL/intersections.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Simple_cartesian.h>
@ -679,11 +682,9 @@ int main()
std::cout << std::endl << "Testing with Simple_cartesian<double>..." << std::endl ;
b &= test_kernel<CGAL::Simple_cartesian<double> >(true);
#ifdef CGAL_USE_GMP
std::cout << std::endl << "Testing with Simple_cartesian<Gmpq>..." << std::endl ;
b &= test_kernel<CGAL::Simple_cartesian<CGAL::Gmpq> >(true);
#endif
std::cout << std::endl << "Testing with Simple_cartesian<Rational>..." << std::endl ;
b &= test_kernel<CGAL::Simple_cartesian<Rational> >(true);
std::cout << std::endl << "Testing with Cartesian<float>..." << std::endl ;
b &= test_kernel<CGAL::Cartesian<float> >(false);

View File

@ -1,19 +1,14 @@
#include <cassert>
#include <CGAL/Cartesian.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq NT;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> NT;
#endif
#include <CGAL/Arithmetic_kernel.h>
typedef CGAL::Cartesian<NT> Kernel;
typedef Kernel::Triangle_3 Triangle;
typedef Kernel::Point_3 Point;
typedef Kernel::Segment_3 Segment;
typedef std::vector<Point> Polygon2;
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational NT;
typedef CGAL::Cartesian<NT> Kernel;
typedef Kernel::Triangle_3 Triangle;
typedef Kernel::Point_3 Point;
typedef Kernel::Segment_3 Segment;
typedef std::vector<Point> Polygon2;
void test_coplanar_triangles(){
CGAL::Object obj;

View File

@ -37,7 +37,7 @@
namespace CGAL {
// Epeck_ft is either Gmpq or Quotient<MP_float>
// Epeck_ft is either Gmpq, or leda_rational, or Quotient<MP_float>
typedef internal::Exact_field_selector<double>::Type Epeck_ft;
// The following are redefined kernels instead of simple typedefs in order to shorten

View File

@ -223,9 +223,9 @@ namespace CommonKernelFunctors {
if(sc_prod_1 >= 0 ) {
if(cosine >= 0) {
// the two cosine are >= 0, cosine is decreasing on [0,1]
return compare(CGAL::square(cosine)*
abac1.squared_length()*abad1.squared_length(),
CGAL::square(sc_prod_1));
return CGAL::compare(CGAL::square(cosine)*
abac1.squared_length()*abad1.squared_length(),
CGAL::square(sc_prod_1));
}
else {
return SMALLER;
@ -234,9 +234,9 @@ namespace CommonKernelFunctors {
else {
if(cosine < 0) {
// the two cosine are < 0, cosine is increasing on [-1,0]
return compare(CGAL::square(sc_prod_1),
CGAL::square(cosine)*
abac1.squared_length()*abad1.squared_length());
return CGAL::compare(CGAL::square(sc_prod_1),
CGAL::square(cosine)*
abac1.squared_length()*abad1.squared_length());
}
else
return LARGER;
@ -272,10 +272,10 @@ namespace CommonKernelFunctors {
if(sc_prod_1 >= 0 ) {
if(sc_prod_2 >= 0) {
// the two cosine are >= 0, cosine is decreasing on [0,1]
return compare(CGAL::square(sc_prod_2)*
abac1.squared_length()*abad1.squared_length(),
CGAL::square(sc_prod_1)*
abac2.squared_length()*abad2.squared_length());
return CGAL::compare(CGAL::square(sc_prod_2)*
abac1.squared_length()*abad1.squared_length(),
CGAL::square(sc_prod_1)*
abac2.squared_length()*abad2.squared_length());
}
else {
return SMALLER;
@ -284,10 +284,10 @@ namespace CommonKernelFunctors {
else {
if(sc_prod_2 < 0) {
// the two cosine are < 0, cosine is increasing on [-1,0]
return compare(CGAL::square(sc_prod_1)*
abac2.squared_length()*abad2.squared_length(),
CGAL::square(sc_prod_2)*
abac1.squared_length()*abad1.squared_length());
return CGAL::compare(CGAL::square(sc_prod_1)*
abac2.squared_length()*abad2.squared_length(),
CGAL::square(sc_prod_2)*
abac1.squared_length()*abad1.squared_length());
}
else
return LARGER;
@ -306,14 +306,14 @@ namespace CommonKernelFunctors {
result_type
operator()(const T1& p, const T2& q, const FT& d2) const
{
return CGAL_NTS compare(squared_distance(p, q), d2);
return CGAL::compare(squared_distance(p, q), d2);
}
template <class T1, class T2, class T3, class T4>
result_type
operator()(const T1& p, const T2& q, const T3& r, const T4& s) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(r, s));
return CGAL::compare(squared_distance(p, q), squared_distance(r, s));
}
};
@ -328,14 +328,14 @@ namespace CommonKernelFunctors {
result_type
operator()(const T1& p, const T2& q, const FT& d2) const
{
return CGAL_NTS compare(squared_distance(p, q), d2);
return CGAL::compare(squared_distance(p, q), d2);
}
template <class T1, class T2, class T3, class T4>
result_type
operator()(const T1& p, const T2& q, const T3& r, const T4& s) const
{
return CGAL_NTS compare(squared_distance(p, q), squared_distance(r, s));
return CGAL::compare(squared_distance(p, q), squared_distance(r, s));
}
};

View File

@ -31,7 +31,7 @@ _test_io_for(const T& t)
{
{
std::ofstream oFile("Test_IO.out", std::ios::out);
oFile << t;
oFile << t << std::endl;
}
std::ifstream iFile("Test_IO.out", std::ios::in);

View File

@ -8,19 +8,12 @@
#define VEC_DIM 10
#define MAT_DIM 10
#ifdef CGAL_USE_LEDA
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/leda_integer.h>
#include <CGAL/leda_rational.h>
typedef leda_integer RT;
typedef leda_rational FT;
#if defined( CGAL_USE_LEDA) || defined ( CGAL_USE_GMP )
#elif defined CGAL_USE_GMP
#include <CGAL/Gmpz.h>
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpz RT;
typedef CGAL::Gmpq FT;
typedef CGAL::Arithmetic_kernel::Integer RT;
typedef CGAL::Arithmetic_kernel::Rational FT;
#else

View File

@ -1,33 +1,13 @@
//---------------------------------------------------------------------
// file generated by notangle from noweb/Kernel_d-tests.lw
// please debug or modify noweb file
// coding: M. Seel
//---------------------------------------------------------------------
#include <CGAL/basic.h>
#include <CGAL/Homogeneous_d.h>
#include <CGAL/Cartesian_d.h>
#include <CGAL/simple_transformations_d.h>
#include <CGAL/test_macros.h>
#include <CGAL/Arithmetic_kernel.h>
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>
#include <CGAL/leda_rational.h>
typedef leda_integer RT_;
typedef leda_rational FT_;
#else
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpz.h>
#include <CGAL/Quotient.h>
typedef CGAL::Gmpz RT_;
typedef CGAL::Quotient<RT_> FT_;
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::MP_Float RT_;
typedef CGAL::Quotient<RT_> FT_;
#endif
#endif
typedef CGAL::Arithmetic_kernel::Integer RT_;
typedef CGAL::Arithmetic_kernel::Rational FT_;
int main()

View File

@ -1,15 +1,7 @@
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>
#ifdef CGAL_USE_GMP
// GMP is installed. Use the GMP rational number-type.
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Rational;
#else
// GMP is not installed. Use CGAL's exact rational number-type.
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Rational;
#endif
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Rational;
#include <CGAL/Cartesian.h>
#include <CGAL/minkowski_sum_2.h>

View File

@ -1,15 +1,7 @@
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>
#ifdef CGAL_USE_GMP
// GMP is installed. Use the GMP rational number-type.
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq Rational;
#else
// GMP is not installed. Use CGAL's exact rational number-type.
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Quotient<CGAL::MP_Float> Rational;
#endif
// leda_rational, or Gmpq, or Quotient<MP_float>
typedef CGAL::Arithmetic_kernel::Rational Rational;
#include <CGAL/Cartesian.h>
#include <CGAL/Polygon_2.h>

View File

@ -1,4 +1,4 @@
#include<CGAL/Gmpz.h>
#include <CGAL/Arithmetic_kernel.h>
#include<CGAL/Homogeneous.h>
#include<CGAL/Nef_polyhedron_3.h>
#include<CGAL/IO/Nef_polyhedron_iostream_3.h>
@ -11,7 +11,7 @@
#include<CGAL/Minkowski_sum_3/Gaussian_map_to_nef_3.h>
#include<fstream>
typedef CGAL::Gmpz RT;
typedef CGAL::Arithmetic_kernel::Integer RT;
typedef CGAL::Homogeneous<RT> Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel, CGAL::SNC_indexed_items> Nef_polyhedron_3;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron_3;

View File

@ -39,7 +39,7 @@
#include <boost/type_traits/is_same.hpp>
#ifndef CGAL_USE_LEDA
#ifndef CGAL_USE_LEDA_LIBRARY
#define LEDA_MEMORY(t)
#endif

View File

@ -35,7 +35,7 @@
#include <boost/any.hpp>
#endif
#ifdef CGAL_USE_LEDA
#ifdef CGAL_USE_LEDA_LIBRARY
#include <CGAL/LEDA_basic.h>
# if __LEDA__ > 410 && __LEDA__ < 441
# define CGAL_USING_PPL

View File

@ -24,22 +24,9 @@
#define CGAL_NEF_DEBUG 23
#include <CGAL/Nef_2/debug.h>
#if defined(CGAL_USE_LEDA)
#if defined(CGAL_USE_LEDA_LIBRARY)
#include <CGAL/LEDA_basic.h>
#if CGAL_LEDA_VERSION < 500
#include <LEDA/tuple.h>
#include <LEDA/slist.h>
#include <LEDA/list.h>
#include <LEDA/map.h>
#include <LEDA/map2.h>
#include <LEDA/sortseq.h>
#include <LEDA/p_queue.h>
#include <LEDA/impl/ab_tree.h>
#include <LEDA/impl/bb_tree.h>
#include <LEDA/impl/rb_tree.h>
#include <LEDA/impl/rs_tree.h>
#include <LEDA/impl/skiplist.h>
#else
#include <LEDA/core/tuple.h>
#include <LEDA/core/slist.h>
#include <LEDA/core/list.h>
@ -52,7 +39,7 @@
#include <LEDA/core/impl/rb_tree.h>
#include <LEDA/core/impl/rs_tree.h>
#include <LEDA/core/impl/skiplist.h>
#endif
#include <utility>
#include <sstream>
@ -444,8 +431,8 @@ public:
} // namespace CGAL
#endif // defined(CGAL_USE_LEDA)
#if !defined(CGAL_USE_LEDA)
#endif // defined(CGAL_USE_LEDA_LIBRARY)
#if !defined(CGAL_USE_LEDA_LIBRARY)
#include <list>
#include <string>
#include <sstream>
@ -1123,10 +1110,10 @@ public:
} // namespace CGAL
#endif // !defined(CGAL_USE_LEDA)
#endif // !defined(CGAL_USE_LEDA_LIBRARY)
namespace CGAL {
#if defined(CGAL_USE_LEDA)
#if defined(CGAL_USE_LEDA_LIBRARY)
#define Segment_overlay_traits leda_seg_overlay_traits
static const char* const sweepversion = "LEDA segment overlay sweep";
#else

View File

@ -4,23 +4,16 @@
#include <CGAL/Filtered_extended_homogeneous.h>
#include <CGAL/Extended_cartesian.h>
#include <CGAL/Nef_polyhedron_2.h>
#include <CGAL/Arithmetic_kernel.h>
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>
#include <CGAL/leda_rational.h>
typedef leda_integer Integer;
typedef leda_rational Rational;
#else
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpz.h>
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpz Integer;
typedef CGAL::Gmpq Rational;
#if defined (CGAL_USE_LEDA) || defined (CGAL_USE_GMP)
typedef CGAL::Arithmetic_kernel::Integer Integer;
typedef CGAL::Arithmetic_kernel::Rational Rational;
#else
typedef long Integer;
typedef double Rational;
#endif
#endif

View File

@ -1,6 +1,7 @@
// file : examples/Nef_2/point_location.C
// file : examples/Nef_2/point_location.cpp
#include <CGAL/Gmpz.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Bounded_kernel.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Filtered_extended_homogeneous.h>
@ -51,7 +52,7 @@ void test() {
int main() {
typedef CGAL::Gmpz RT;
typedef CGAL::Arithmetic_kernel::Integer RT;
typedef CGAL::Filtered_extended_homogeneous<RT> EKernel;
typedef CGAL::Homogeneous<RT> HOM;
typedef CGAL::Bounded_kernel<HOM> BKernel;

View File

@ -23,26 +23,27 @@
#include <CGAL/Nef_polyhedron_3.h>
// --- begin preliminary number type converter -----------------
#ifndef CGAL_NUMBER_TYPE_CONVERTER_NEF_3_H
#define CGAL_NUMBER_TYPE_CONVERTER_NEF_3_H
#include<sstream>
#include<CGAL/Gmpz.h>
#include<CGAL/Gmpq.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Fraction_traits.h>
#include<CGAL/Cartesian.h>
#include<CGAL/Homogeneous.h>
#include<CGAL/Nef_S2/Normalizing.h>
#include<CGAL/Nef_nary_union_3.h>
#ifdef CGAL_USE_LEDA
#include<CGAL/leda_integer.h>
#include<CGAL/leda_rational.h>
#endif // CGAL_USE_LEDA
namespace CGAL {
typedef CGAL::Arithmetic_kernel::Integer Integer;
typedef CGAL::Arithmetic_kernel::Rational Rational;
class Homogeneous_tag;
class Cartesian_tag;
template<typename Tag, typename Kernel> class number_type_converter_nef_3;
@ -55,15 +56,21 @@ class number_type_converter_nef_3<Homogeneous_tag, Kernel> {
{
typedef typename Kernel::Point_3 Point_3;
typedef typename Kernel::RT RT;
CGAL::Gmpq x(d.x()), y(d.y()), z(d.z());
CGAL::Homogeneous<CGAL::Gmpz>::Point_3 b =
normalized ( CGAL::Homogeneous<CGAL::Gmpz>::Point_3 (
x.numerator() * y.denominator() * z.denominator(),
x.denominator() * y.numerator() * z.denominator(),
x.denominator() * y.denominator() * z.numerator(),
x.denominator() * y.denominator() * z.denominator() ) );
typedef Fraction_traits<Rational> F_traits;
Rational x(d.x()), y(d.y()), z(d.z());
Integer xn, xd, yn, yd, zn, zd;
typename F_traits::Decompose decompose;
decompose(x, xn, xd);
decompose(y, yn, yd);
decompose(z, zn, zd);
CGAL::Homogeneous<Integer>::Point_3 b =
normalized ( CGAL::Homogeneous<Integer>::Point_3 (
xn * yd * zd,
xd * yn * zd,
xd * yd * zn,
xd * yd * zd ) );
std::ostringstream outx, outy, outz, outw;
outx << b.hx();

View File

@ -28,23 +28,9 @@
#define CGAL_NEF3_SORT_OUTPUT 1
#include <CGAL/Gmpz.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Quotient.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Homogeneous.h>
typedef CGAL::Gmpz NT;
typedef CGAL::Gmpq FNT;
typedef CGAL::Quotient<NT> FNT2;
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>
#include <CGAL/leda_rational.h>
typedef leda_integer LNT;
typedef leda_rational LFNT;
typedef CGAL::Quotient<LNT> LFNT2;
#endif
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include <CGAL/OFF_to_nef_3.h>
@ -53,6 +39,11 @@ typedef CGAL::Quotient<LNT> LFNT2;
#include <cassert>
#include <string>
typedef CGAL::Arithmetic_kernel::Integer NT;
typedef CGAL::Arithmetic_kernel::Rational FNT;
template<typename Kernel>
class test {
@ -131,36 +122,22 @@ int main() {
CGAL::Timer t;
t.start();
#ifndef CGAL_USE_LEDA
{ typedef CGAL::Homogeneous<NT> H_kernel;
typedef CGAL::Cartesian<FNT> C_kernel;
// typedef CGAL::Cartesian<FNT2> Q_kernel;
#if defined( CGAL_USE_LEDA ) || defined ( CGAL_USE_GMP )
typedef CGAL::Homogeneous<NT> H_kernel;
typedef CGAL::Cartesian<FNT> C_kernel;
test<H_kernel> test_H;
test<C_kernel> test_C;
test<H_kernel> test_H;
test<C_kernel> test_C;
// test<Q_kernel> test_Q;
test_H.run_test(true,".H");
test_C.run_test(false,".C");
// test_Q.run_test();
}
#else
{ typedef CGAL::Homogeneous<LNT> LH_kernel;
typedef CGAL::Cartesian<LFNT> LC_kernel;
// typedef CGAL::Cartesian<LFNT2> LQ_kernel;
test<LH_kernel> test_LH;
test<LC_kernel> test_LC;
// test<LQ_kernel> test_LQ;
test_LH.run_test(true,".H");
test_LC.run_test(false,".LC");
// test_LQ.run_test();
}
test_H.run_test(true,".H");
# ifdef CGAL_USE_GMP
test_C.run_test(false,".C");
# else
test_C.run_test(false,".LC");
# endif
#endif
t.stop();
std::cout << "Time " << t.time() << std::endl;
return 0;
}

View File

@ -26,19 +26,13 @@
#define CGAL_NEF3_SORT_OUTPUT 1
#include <CGAL/basic.h>
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>
typedef leda_integer NT;
#else
#include <CGAL/Gmpz.h>
typedef CGAL::Gmpz NT;
#endif
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Extended_homogeneous.h>
#include <CGAL/Timer.h>
#include <CGAL/test_Nef_3.h>
int main() {
typedef CGAL::Arithmetic_kernel::Integer NT;
typedef CGAL::Extended_homogeneous<NT> EH_kernel;
#ifdef CGAL_CFG_ISTREAM_INT_BUG

View File

@ -26,19 +26,13 @@
#define CGAL_NEF3_SORT_OUTPUT 1
#include <CGAL/basic.h>
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>
typedef leda_integer NT;
#else
#include <CGAL/Gmpz.h>
typedef CGAL::Gmpz NT;
#endif
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Timer.h>
#include <CGAL/test_Nef_3.h>
int main() {
typedef CGAL::Arithmetic_kernel::Integer NT;
typedef CGAL::Homogeneous<NT> H_kernel;
#ifdef CGAL_CFG_ISTREAM_INT_BUG

View File

@ -26,8 +26,8 @@
#define CGAL_NEF3_SORT_OUTPUT 1
#include <CGAL/Gmpq.h>
typedef CGAL::Gmpq NT;
#include <CGAL/Arithmetic_kernel.h>
typedef CGAL::Arithmetic_kernel::Rational NT;
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Lazy_kernel.h>
#include <CGAL/Timer.h>

View File

@ -57,12 +57,14 @@ namespace CGAL { namespace internal {
// Two classes which tell the prefered "exact number types" corresponding to a type.
// The default template chooses Gmpq or Quotient<MP_Float>.
// The default template chooses Gmpq, or leda_rational, or Quotient<MP_Float>.
// It should support the built-in types.
template < typename >
struct Exact_field_selector
#ifdef CGAL_USE_GMP
{ typedef Gmpq Type; };
#elif defined(CGAL_USE_LEDA)
{ typedef leda_rational Type; };
#else
{ typedef Quotient<MP_Float> Type; };
#endif

View File

@ -1,6 +1,5 @@
#include <CGAL/basic.h>
#include <CGAL/config.h>
#ifdef CGAL_USE_GMP

View File

@ -1,3 +1,8 @@
#include <CGAL/config.h>
#ifdef CGAL_USE_GMP
#include <iostream>
#include <cassert>
#include <CGAL/Gmpzf.h>
@ -31,3 +36,12 @@ int main() {
}
return 0;
}
#else
int main()
{
return 0;
}
#endif

View File

@ -1,14 +1,8 @@
#define CGAL_POLYGON_DEBUG 1
#include <CGAL/Cartesian.h>
#include <CGAL/Quotient.h>
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpz.h>
typedef CGAL::Quotient<CGAL::Gmpz> NT;
#else
#include <CGAL/MP_Float.h>
typedef CGAL::Quotient<CGAL::MP_Float> NT;
#endif
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Point_2.h>
#include <CGAL/Polygon_2_algorithms.h>
@ -23,6 +17,7 @@ using std::endl;
bool TestSimplicity(const char* FileName)
// tests the simplicity of the polygon in the file FileName
{
typedef CGAL::Arithmetic_kernel::Rational NT;
typedef CGAL::Cartesian<NT> K;
typedef CGAL::Point_2<K> Point;

View File

@ -5,7 +5,21 @@
#include <cassert>
// choose number type
#ifdef CGAL_USE_GMP
// choose number type
#ifdef CGAL_USE_LEDA
# include <CGAL/leda_rational.h>
typedef leda_rational exact_ring_t;
typedef leda_rational exact_field_t;
namespace CGAL {
// needed for the drawing methods
leda_rational sqrt(const leda_rational& x) {
return leda_rational( CGAL::sqrt( CGAL::to_double(x) ) );
}
}
#elif defined( CGAL_USE_GMP )
# include <CGAL/Gmpq.h>
typedef CGAL::Gmpq exact_ring_t;

View File

@ -5,7 +5,19 @@
#include <cassert>
// choose number type
#ifdef CGAL_USE_GMP
#ifdef CGAL_USE_LEDA
# include <CGAL/leda_rational.h>
typedef leda_rational exact_ring_t;
typedef leda_rational exact_field_t;
namespace CGAL {
// needed for the drawing methods
leda_rational sqrt(const leda_rational& x) {
return leda_rational( CGAL::sqrt( CGAL::to_double(x) ) );
}
}
#elif defined( CGAL_USE_GMP )
# include <CGAL/Gmpq.h>
typedef CGAL::Gmpq exact_ring_t;

View File

@ -1,4 +1,3 @@
// examples/Skin_surface_3/skin_surface_simple.C
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Skin_surface_3.h>
@ -31,7 +30,10 @@ public:
std::ifstream in(filename.c_str());
assert(in.is_open());
Weighted_point wp;
while (in >> wp) l.push_front(wp);
double x, y, z, w;
while (in >> x >> y >> z >> w ) {
l.push_front(Weighted_point(Bare_point(x,y,z),w));
}
Skin_surface_3 skin_surface(l.begin(), l.end(), s);

View File

@ -1,4 +1,4 @@
// test/Skin_surface_3/subdivision_test.C
// test/Skin_surface_3/subdivision_test.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Skin_surface_3.h>
#include <CGAL/Polyhedron_3.h>

View File

@ -308,7 +308,7 @@ typename Kernel_traits<Bare_point>::Kernel::Oriented_side
power_test_2(const Weighted_point<Bare_point, Weight> &p,
const Weighted_point<Bare_point, Weight> &t)
{
Comparison_result r = compare(p.weight(), t.weight());
Comparison_result r = CGAL::compare(p.weight(), t.weight());
if(r == LARGER) return ON_NEGATIVE_SIDE;
else if (r == SMALLER) return ON_POSITIVE_SIDE;
return ON_ORIENTED_BOUNDARY;

View File

@ -61,19 +61,29 @@ using namespace CGAL;
// - EPEC,
// - or EPIC (the default)
#ifdef SC_DOUBLE
typedef Simple_cartesian<double> K;
typedef Simple_cartesian<double> K;
#elif C_LEDA
# include <CGAL/leda_rational.h>
# include <CGAL/Cartesian.h>
typedef Cartesian<leda_rational> K;
#elif defined(ONLY_STATIC_FILTERS)
typedef CGAL::internal::Static_filters<CGAL::Simple_cartesian<double> > K;
typedef CGAL::internal::Static_filters<CGAL::Simple_cartesian<double> > K;
#elif defined(EPEC)
# ifdef CGAL_DONT_USE_LAZY_KERNEL
typedef Epeck K;
# else
typedef Simple_cartesian<Gmpq> SK;
typedef Lazy_kernel<SK> K;
# endif
typedef Epeck K;
# else // not CGAL_DONT_USE_LAZY_KERNEL
# ifdef CGAL_USE_LEDA
# include <CGAL/leda_rational.h>
# include <CGAL/Cartesian.h>
typedef Cartesian<leda_rational> SK;
# else // not CGAL_USE_LEDA
typedef Simple_cartesian<Gmpq> SK;
# endif // not CGAL_USE_LEDA
typedef Lazy_kernel<SK> K;
# endif // not CGAL_DONT_USE_LAZY_KERNEL
#else // EPIC
typedef Exact_predicates_inexact_constructions_kernel K;
#endif
typedef Exact_predicates_inexact_constructions_kernel K;
#endif // EPIC
typedef Regular_triangulation_euclidean_traits_3<K> WK;
typedef K::Point_3 Point;
@ -104,9 +114,11 @@ Point rnd_point()
void generate_points()
{
if (input_file_selected) {
Point p;
while (input_file >> p)
pts.push_back(p);
Point p;
while (input_file >> p){
pts.push_back(p);
}
cout << " [ Read " << pts.size() << " points from file ] " << endl;
min_pts = max_pts = pts.size();
}
@ -240,7 +252,7 @@ int main(int argc, char **argv)
cout << "\nProcessor : "
<< ((sizeof(void*)==4) ? 32 : (sizeof(void*)==8) ? 64 : -1) << " bits\n";
// cout << "Kernel : EPICK\n";
cout << "Kernel typeid: " << typeid(K).name() << "\n";
do_benchmarks<Delaunay_triangulation_3<K> >("Delaunay [Compact_location]");
if (input_file_selected)

View File

@ -398,7 +398,7 @@ public:
const Weighted_point_3 & s,
const FT& w) const
{
return compare(
return CGAL::compare(
squared_radius_orthogonal_sphereC3(
p.x(),p.y(),p.z(),p.weight(),
q.x(),q.y(),q.z(),q.weight(),
@ -413,7 +413,7 @@ public:
const Weighted_point_3 & r,
const FT& w) const
{
return compare(
return CGAL::compare(
squared_radius_smallest_orthogonal_sphereC3(
p.x(),p.y(),p.z(),p.weight(),
q.x(),q.y(),q.z(),q.weight(),
@ -426,7 +426,7 @@ public:
const Weighted_point_3 & q,
const FT& w) const
{
return compare(
return CGAL::compare(
squared_radius_smallest_orthogonal_sphereC3(
p.x(),p.y(),p.z(),p.weight(),
q.x(),q.y(),q.z(),q.weight() ),
@ -437,7 +437,7 @@ public:
const Weighted_point_3 & p,
const FT& w) const
{
return compare(-p.weight(),w);
return CGAL::compare(-p.weight(),w);
}
};

View File

@ -21,6 +21,9 @@
#ifndef CGAL_REGULAR_TRIANGULATION_FTC3_H
#define CGAL_REGULAR_TRIANGULATION_FTC3_H
#include <CGAL/number_utils.h>
#include <CGAL/predicates/sign_of_determinant.h>
// This file contains the low level cartesian predicates
// used by the 3D regular triangulation.

View File

@ -295,7 +295,7 @@ _test_cls_delaunay_3(const Triangulation &)
std::cout << " I/O" << std::endl;
{
std::ofstream oFileT1("Test1_triangulation_IO_3",std::ios::out);
oFileT1 << T0;
oFileT1 << T0 << std::endl;
}
std::ifstream iFileT1("Test1_triangulation_IO_3",std::ios::in);
iFileT1 >> Tfromfile;
@ -316,7 +316,7 @@ _test_cls_delaunay_3(const Triangulation &)
std::cout << " I/O" << std::endl;
{
std::ofstream oFileT2("Test2_triangulation_IO_3",std::ios::out);
oFileT2 << T0;
oFileT2 << T0 << std::endl;
}
std::ifstream iFileT2("Test2_triangulation_IO_3",std::ios::in);
iFileT2 >> Tfromfile;
@ -338,7 +338,7 @@ _test_cls_delaunay_3(const Triangulation &)
std::cout << " I/O" << std::endl;
{
std::ofstream oFileT3("Test3_triangulation_IO_3",std::ios::out);
oFileT3 << T0;
oFileT3 << T0 << std::endl;
}
std::ifstream iFileT3("Test3_triangulation_IO_3",std::ios::in);
iFileT3 >> Tfromfile;

View File

@ -85,7 +85,7 @@ _test_cls_tds_3( const Tds &)
std::cout << " I/O" << std::endl;
{
std::ofstream oFileT("Test_tds_IO_3", std::ios::out);
oFileT << tds1;
oFileT << tds1 << std::endl;
}
std::ifstream iFileT("Test_tds_IO_3", std::ios::in);
iFileT >> tdsfromfile;

View File

@ -52,7 +52,7 @@ _test_cls_triangulation_3_input_output(const Triangulation & T,
std::cout << " I/O" << std::endl;
{
std::ofstream oFile(filename, std::ios::out);
oFile << T;
oFile << T << std::endl;
}
std::ifstream iFile(filename, std::ios::in);
Triangulation Tfromfile;