From f2e210cf288efeeb398806b3e6b0d4ed0c1a4b82 Mon Sep 17 00:00:00 2001 From: Sebastian Limbach Date: Wed, 28 Feb 2007 16:11:28 +0000 Subject: [PATCH] ipower.h and hgdelta_update.h included, since these functions are now placed in its own files. --- .../include/CGAL/Polynomial/prs_resultant.h | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Polynomial/include/CGAL/Polynomial/prs_resultant.h b/Polynomial/include/CGAL/Polynomial/prs_resultant.h index b7a7cf0ef05..67ce9befef4 100644 --- a/Polynomial/include/CGAL/Polynomial/prs_resultant.h +++ b/Polynomial/include/CGAL/Polynomial/prs_resultant.h @@ -22,8 +22,11 @@ #include #include -#ifndef CGAL_PRS_RESULTANT_H -#define CGAL_PRS_RESULTANT_H +#include +#include + +#ifndef CGAL_POLYNOMIAL_PRS_RESULTANT_H +#define CGAL_POLYNOMIAL_PRS_RESULTANT_H CGAL_BEGIN_NAMESPACE @@ -43,7 +46,7 @@ NT prs_resultant_ufd(Polynomial A, Polynomial B) { } NT a = A.content(), b = B.content(); - NT g(1), h(1), t = ipower(a, B.degree()) * ipower(b, A.degree()); + NT g(1), h(1), t = INTERN_POLYNOMIAL::ipower(a, B.degree()) * INTERN_POLYNOMIAL::ipower(b, A.degree()); Polynomial Q, R; NT d; int delta; @@ -54,9 +57,9 @@ NT prs_resultant_ufd(Polynomial A, Polynomial B) { delta = A.degree() - B.degree(); CGAL_expensive_assertion( typename CGAL::Algebraic_structure_traits::Is_exact == CGAL_Tag_false - || d == ipower(B.lcoeff(), delta + 1) ); + || d == INTERN_POLYNOMIAL::ipower(B.lcoeff(), delta + 1) ); A = B; - B = R / (g * ipower(h, delta)); + B = R / (g * INTERN_POLYNOMIAL::ipower(h, delta)); g = A.lcoeff(); // h = h^(1-delta) * g^delta INTERN_POLYNOMIAL::hgdelta_update(h, g, delta); @@ -91,11 +94,11 @@ NT prs_resultant_field(Polynomial A, Polynomial B) { while (B.degree() > 0) { signflip ^= (A.degree() & B.degree() & 1); Polynomial::euclidean_division(A, B, Q, R); - res *= ipower(B.lcoeff(), A.degree() - R.degree()); + res *= INTERN_POLYNOMIAL::ipower(B.lcoeff(), A.degree() - R.degree()); A = B; B = R; } - res = ipower(B.lcoeff(), A.degree()) * (signflip ? -res : res); + res = INTERN_POLYNOMIAL::ipower(B.lcoeff(), A.degree()) * (signflip ? -res : res); typename Algebraic_structure_traits::Simplify simplify; simplify(res); return res; @@ -140,7 +143,7 @@ NT prs_resultant_decompose(Polynomial A, Polynomial B){ B.simplify_coefficients(); INTPOLY A0 = integralize_polynomial(A, a); INTPOLY B0 = integralize_polynomial(B, b); - DENOM c = ipower(a, B.degree()) * ipower(b, A.degree()); + DENOM c = INTERN_POLYNOMIAL::ipower(a, B.degree()) * INTERN_POLYNOMIAL::ipower(b, A.degree()); typedef typename Algebraic_structure_traits::Algebraic_category Algebraic_category; RES res0 = INTERN_PRS_RESULTANT::prs_resultant_(A0, B0, Algebraic_category()); typename Fraction_traits::Compose comp_frac; @@ -188,6 +191,6 @@ NT prs_resultant(Polynomial A, Polynomial B) { CGAL_END_NAMESPACE -#endif // CGAL_PRS_RESULTANT_H +#endif // CGAL_POLYNOMIAL_PRS_RESULTANT_H // EOF