Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1676,8 +1676,11 @@ class Algebraic_curve_kernel_2 : public AlgebraicKernel_d_1{
typedef typename Curve_analysis_2::size_type size_type;
Polynomial_2 gcd = gcd_cache(std::make_pair(f,g));
size_type n = CGAL::degree(gcd);
size_type nc = CGAL::degree(
CGAL::univariate_content_up_to_constant_factor(gcd));
// the content of a gcd of degree 0 in y is its only
// coefficient; it is computed only in that case
size_type nc = (n != 0) ? 0 : CGAL::degree(gcd[0]);
CGAL_assertion(n != 0 || nc == CGAL::degree(
CGAL::univariate_content_up_to_constant_factor(gcd)));
if( n!=0 || nc!=0 ) {
Curve_analysis_2 common_curve = cc_2(gcd);
*oib++ = common_curve;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,15 @@ class Curve_analysis_2 : public ::CGAL::Handle_with_policy< Rep_ > {

Bound b = bound_value_in_interval(i);

// look up the cached status line by the rational value first, which
// avoids constructing an algebraic real
typename Rep::Vert_line_at_rational_map::const_iterator it =
this->ptr()->vert_line_at_rational_map.find(b);
if (it != this->ptr()->vert_line_at_rational_map.end()) {
CGAL_postcondition(! it->second.is_event());
return it->second;
}

Status_line_1 intermediate_line
= status_line_at_exact_non_event_x(Algebraic_real_1(b));

Expand Down
Loading