diff --git a/Algebraic_kernel_d/include/CGAL/Arithmetic_kernel.h b/Algebraic_kernel_d/include/CGAL/Arithmetic_kernel.h deleted file mode 100644 index 99200c82d21..00000000000 --- a/Algebraic_kernel_d/include/CGAL/Arithmetic_kernel.h +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) 2008 Max-Planck-Institute Saarbruecken (Germany). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; version 2.1 of the License. -// See the file LICENSE.LGPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Michael Hemmer -// -// ============================================================================ -// -// \brief provide class Arithmetic_kernel, a collection of number types. -// - -// - -/*! \file CGAL/Arithmetic_kernel.h - * \brief Declarations pertaining to CGAL::Arithmetic_kernel - */ - -#ifndef CGAL_ARITHMETIC_KERNEL_H -#define CGAL_ARITHMETIC_KERNEL_H - -#include - -//#include // TODO: Not available yet. -//#include // TODO: Not available yet. - -#ifdef CGAL_USE_LEDA -#include -#include -#include -#include -#include - -#endif // CGAL_USE_LEDA - -#ifdef CGAL_USE_GMP -#include -#include -#include - -#ifdef CGAL_USE_GMPXX -#include -#endif // CGAL_USE_GMPXX -#endif // CGAL_USE_GMP - -#ifdef CGAL_USE_CORE -#include -#include -#include -#include -#endif // CGAL_USE_CORE - -#include - - -CGAL_BEGIN_NAMESPACE - -namespace CGALi { - -class Arithmetic_kernel_base{ -public: - typedef CGAL::Null_tag Integer; - typedef CGAL::Null_tag Rational; - typedef CGAL::Null_tag Field_with_sqrt; - typedef CGAL::Null_tag Field_with_kth_root; - typedef CGAL::Null_tag Field_with_root_of; - typedef CGAL::Null_tag Bigfloat; - typedef CGAL::Null_tag Bigfloat_interval; -}; - -} -#ifdef CGAL_USE_LEDA -/*! \ingroup CGAL_Arithmetic_kernel - * \brief The LEDA set of exact number types - */ -class LEDA_arithmetic_kernel : public CGALi::Arithmetic_kernel_base { -public: - //! exact integers - typedef leda_integer Integer; - //! exact float nummber - typedef leda_bigfloat Exact_float_number; - //! exact rationals, constructible from integers - typedef leda_rational Rational; - //! exact root expressions, constructible from integers and rationals - typedef leda_real Field_with_sqrt; - - // undocumented - typedef leda_bigfloat Bigfloat; - typedef leda_bigfloat_interval Bigfloat_interval; - -}; -#endif // CGAL_USE_LEDA - -#ifdef CGAL_USE_CORE -/*! \ingroup CGAL_Arithmetic_kernel - * \brief The CORE set of exact number types - */ -class CORE_arithmetic_kernel : public CGALi::Arithmetic_kernel_base { -public: - //! exact integers - typedef CORE::BigInt Integer; - //! exact float nummber - typedef CORE::BigRat Exact_float_number; - //! exact rationals, constructible from integers - typedef CORE::BigRat Rational; - //! exact root expressions, constructible from integers and rationals - typedef CORE::Expr Field_with_sqrt; - // undocumented - //typedef CORE::BigFloat Bigfloat; - typedef CORE::BigFloat Bigfloat_interval; - -}; -#endif // CGAL_USE_CORE - -#ifdef CGAL_USE_GMP -/*! \ingroup CGAL_Arithmetic_kernel - * \brief The GMP set of exact number types - */ -class GMP_arithmetic_kernel : public CGALi::Arithmetic_kernel_base { -public: - //! exact integers - typedef CGAL::Gmpz Integer; - //! exact float nummber - typedef CGAL::Gmpq Exact_float_number; - //! exact rationals, constructible from integers - typedef CGAL::Gmpq Rational; - //! exact root expressions, constructible from integers and rationals - typedef CGAL::Null_tag Field_with_sqrt; - typedef CGAL::Null_tag Field_with_kth_root; - typedef CGAL::Null_tag Field_with_root_of; -}; -#endif // CGAL_USE_GMP - -#ifdef CGAL_USE_GMPXX -/*! \ingroup CGAL_Arithmetic_kernel - * \brief The GMP set of exact number types - */ -class GMPXX_arithmetic_kernel : public CGALi::Arithmetic_kernel_base { -public: - //! exact integers - typedef mpz_class Integer; - //! exact float nummber - typedef mpq_class Exact_float_number; - //! exact rationals, constructible from integers - typedef mpq_class Rational; - //! exact root expressions, constructible from integers and rationals - typedef CGAL::Null_tag Field_with_sqrt; -}; -#endif // CGAL_USE_GMPXX - -// Define a default Arithmetic_kernel -#if defined(CGAL_USE_CORE) -typedef CORE_arithmetic_kernel Arithmetic_kernel; -#else -#if defined(CGAL_USE_LEDA) -typedef LEDA_arithmetic_kernel Arithmetic_kernel; -#endif -#endif - -#if defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE) -#ifndef CGAL_HAVE_DEFAULT_ARITHMETIC_KERNEL -#define CGAL_HAVE_DEFAULT_ARITHMETIC_KERNEL 1 -#endif -#endif // defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE) - -// Macro to snap typedefs in Arithmetic_kernel -#define CGAL_SNAP_ARITHMETIC_KERNEL_TYPEDEFS(AT) \ - typedef typename AT::Integer Integer; \ - typedef typename AT::Rational Rational; \ - typedef typename AT::Field_with_sqrt Field_with_sqrt; - -// end #define - - -template< class NT > struct Get_arithmetic_kernel; - -#ifdef CGAL_USE_LEDA - - template <> - struct Get_arithmetic_kernel { - typedef LEDA_arithmetic_kernel Arithmetic_kernel; - }; - template <> - struct Get_arithmetic_kernel{ - typedef LEDA_arithmetic_kernel Arithmetic_kernel; - }; - template <> - struct Get_arithmetic_kernel{ - typedef LEDA_arithmetic_kernel Arithmetic_kernel; - }; - template <> - struct Get_arithmetic_kernel{ - typedef LEDA_arithmetic_kernel Arithmetic_kernel; - }; - template <> - struct Get_arithmetic_kernel{ - typedef LEDA_arithmetic_kernel Arithmetic_kernel; - }; -#endif //CGAL_USE_LEDA - - -#ifdef CGAL_USE_CORE - - template <> - struct Get_arithmetic_kernel{ - typedef CORE_arithmetic_kernel Arithmetic_kernel; - }; - template <> - struct Get_arithmetic_kernel{ - typedef CORE_arithmetic_kernel Arithmetic_kernel; - }; - template <> - struct Get_arithmetic_kernel{ - typedef CORE_arithmetic_kernel Arithmetic_kernel; - }; - template <> - struct Get_arithmetic_kernel{ - typedef CORE_arithmetic_kernel Arithmetic_kernel; - }; -#endif //CGAL_USE_CORE - - template - struct Get_arithmetic_kernel >{ - typedef Get_arithmetic_kernel GET; - typedef typename GET::Arithmetic_kernel Arithmetic_kernel; - }; - - -CGAL_END_NAMESPACE - -#endif // CGAL_ARITHMETIC_KERNEL_H -// EOF