mirror of https://github.com/CGAL/cgal
hgdelta_update function from Polynomial.h is now located in this separate file.
This commit is contained in:
parent
4ac28b0e44
commit
44e4adcbb7
|
|
@ -1722,6 +1722,7 @@ Polynomial/doc_tex/Polynomial_ref/PolynomialTraits_d_InnermostLeadingCoefficient
|
|||
Polynomial/doc_tex/Polynomial_ref/PolynomialTraits_d_Move.tex -text
|
||||
Polynomial/doc_tex/Polynomial_ref/Polynomial_1.tex -text
|
||||
Polynomial/include/CGAL/Polynomial/Coercion_traits.h -text
|
||||
Polynomial/include/CGAL/Polynomial/hgdelta_update.h -text
|
||||
Polytope_distance_d/test/Polytope_distance_d/create_test_PD_cin -text
|
||||
Polytope_distance_d/test/Polytope_distance_d/test_PD.cin -text
|
||||
Polytope_distance_d/test/Polytope_distance_d/test_PD_data/intersecting_segments.data -text
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// 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) :
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
||||
// they may be wrong now.
|
||||
|
||||
#ifndef CGAL_POLYNOMIAL_HGDELTA_UPDATE_H
|
||||
#define CGAL_POLYNOMIAL_HGDELTA_UPDATE_H
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
||||
// This subroutine has been retained here for use in both new files.
|
||||
namespace INTERN_POLYNOMIAL {
|
||||
template <class NT> inline
|
||||
void hgdelta_update(NT& h, const NT& g, int delta) {
|
||||
typename Algebraic_structure_traits<NT>::Integral_division idiv;
|
||||
|
||||
// compute h = h^(1-delta) * g^delta
|
||||
switch (delta) {
|
||||
case 0:
|
||||
// h = h;
|
||||
break;
|
||||
case 1:
|
||||
h = g;
|
||||
break;
|
||||
default:
|
||||
h = idiv(ipower(g, delta), ipower(h, delta-1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} // namespace INTERN_POLYNOMIAL
|
||||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#endif // CGAL_POLYNOMIAL_HGDELTA_UPDATE_H
|
||||
Loading…
Reference in New Issue