From 2cfc397069d30839d0e82b5f2dca9b4f970b33f3 Mon Sep 17 00:00:00 2001 From: Sebastian Limbach Date: Wed, 28 Mar 2007 10:37:04 +0000 Subject: [PATCH] Forward declarations of ALL functions of this file added to avoid problems with some compilers. --- .../include/CGAL/Polynomial/polynomial_gcd.h | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/Polynomial/include/CGAL/Polynomial/polynomial_gcd.h b/Polynomial/include/CGAL/Polynomial/polynomial_gcd.h index bd5ca7d2594..2e747e56b43 100644 --- a/Polynomial/include/CGAL/Polynomial/polynomial_gcd.h +++ b/Polynomial/include/CGAL/Polynomial/polynomial_gcd.h @@ -37,6 +37,104 @@ CGAL_BEGIN_NAMESPACE +// Forward declarations of ALL functions of this file to avoid problems with +// some compilers. +template< class NT > inline bool may_have_multiple_root( const Polynomial& P ); + +namespace INTERN_POLYNOMIAL_GCD { + +template inline +Polynomial gcd_( const Polynomial& p1, const Polynomial& p2 ); +template inline +Polynomial gcd_innermost_coefficient_dispatch( const Polynomial& p1, + const Polynomial& p2, Field_tag ); +template inline +Polynomial gcd_innermost_coefficient_dispatch( const Polynomial& p1, + const Polynomial& p2, Unique_factorization_domain_tag tag ); + +template inline +Polynomial gcd_( const Polynomial& p1, const Polynomial& p2, + ::CGAL::Tag_false ); +template inline +Polynomial gcd_( const Polynomial& p1, const Polynomial& p2, + ::CGAL::Tag_true tag ); +#ifndef NiX_POLY_USE_PRIMITIVE_GCD + template + Polynomial gcd_( Polynomial p1, Polynomial p2, + Unique_factorization_domain_tag ); +#else + template + Polynomial gcd_( Polynomial p1, Polynomial p2, UFDomain_tag ); +#endif // NiX_POLY_USE_PRIMITIVE_GCD + +template +Polynomial gcd_( Polynomial p1, Polynomial p2, Field_tag ); +template inline +Polynomial gcd( const Polynomial& p1, const Polynomial& p2 ); +template inline +NT gcd_utcf_( const NT& a, const NT& b ); +template inline +Polynomial gcd_utcf_( const Polynomial& p1, const Polynomial& p2 ); +template inline +Polynomial gcd_utcf_( const Polynomial& p1, const Polynomial& p2, + ::CGAL::Tag_false ); +template +Polynomial gcd_utcf_( Polynomial p1, Polynomial p2, + ::CGAL::Tag_true ); +template inline +Polynomial gcd_utcf_( const Polynomial& p1, const Polynomial& p2, + Field_tag tag ); +template +NT content_utcf_( const Polynomial& p ); +template +Polynomial gcd_utcf_( Polynomial p1, Polynomial p2, + Integral_domain_tag ); + +} // namespace INTERN_POLYNOMIAL_GCD + +template inline +Polynomial gcd_utcf( const Polynomial& p1, const Polynomial& p2 ); + +namespace INTERN_POLYNOMIAL_GCD { + +template inline +Polynomial gcdex_( Polynomial x, Polynomial y, Polynomial& xf, + Polynomial& yf, ::CGAL::Tag_false ); +template +Polynomial gcdex_( Polynomial x, Polynomial y, Polynomial& xf, + Polynomial& yf, Field_tag ); +template inline +Polynomial gcdex_( Polynomial x, Polynomial y, Polynomial& xf, + Polynomial& yf, ::CGAL::Tag_true ); + +} // namespace INTERN_POLYNOMIAL_GCD + +template inline +Polynomial gcdex( Polynomial p1, Polynomial p2, Polynomial& f1, + Polynomial& f2 ); +template +Polynomial pseudo_gcdex( +#ifdef DOXYGEN_RUNNING + Polynomial p1, Polynomial p2, + Polynomial& f2, Polynomial& f2, NT& v +#else + Polynomial x, Polynomial y, + Polynomial& xf, Polynomial& yf, NT& vf +#endif // DOXYGEN_RUNNING +); + +template inline +int filtered_square_free_factorization( Polynomial p, + OutputIterator1 factors, OutputIterator2 multiplicities ); +template inline +int filtered_square_free_factorization_utcf( const Polynomial& p, + OutputIterator1 factors, OutputIterator2 multiplicities ); + + +// end of prototypes +//////////////////////////////////////////////////////////////////////////////// + + // TODO: This is a dummy-version of may_have_multiple_root. The original // EXACUS function is defined in polynomial_utils.h, but does currently // not work because of the missing modular traits (and other stuff).