diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/Curve_analysis_2.h index 47526309e8e..6dfd5f9cd5b 100755 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/Curve_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/Curve_analysis_2.h @@ -16,6 +16,8 @@ #include #include +#include + #include #include @@ -292,10 +294,24 @@ public: * \pre \c loc is either \c CGAL::ARR_LEFT_BOUNDARY or * \c CGAL::ARR_RIGHT_BOUNDARY */ -// CGAL::Object asymptotic_value_of_arc(CGAL::Arr_parameter_space loc, -// size_type arcno) const { -// return CGAL::Object(); -// } + CGAL::Object asymptotic_value_of_arc(CGAL::Arr_parameter_space loc, + size_type arcno) const { + + CGAL_precondition(loc == CGAL::ARR_LEFT_BOUNDARY || + loc == CGAL::ARR_RIGHT_BOUNDARY); + + typename Internal_curve_2::Asymptote_y asympt = + (loc == CGAL::ARR_LEFT_BOUNDARY ? + _internal_curve(). + horizontal_asymptote_for_arc_to_minus_infinity(arcno) : + _internal_curve(). + horizontal_asymptote_for_arc_to_plus_infinity(arcno)); + + if(asympt.is_finite()) + return CGAL::make_object(asympt.finite()); + return CGAL::make_object(asympt.infty() == NiX::MINUS_INFTY ? + CGAL::ARR_BOTTOM_BOUNDARY : CGAL::ARR_TOP_BOUNDARY); + } //!@} }; // class Curve_analysis_2 diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/LRU_hashed_map.h b/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/LRU_hashed_map.h index 21731cb4bc6..5626faf01c7 100755 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/LRU_hashed_map.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_curve_kernel_2/LRU_hashed_map.h @@ -244,6 +244,8 @@ struct Curve_pair_hasher_2 size_t operator()(const Pair_of_curves_2& p) const { // uses code from boost::hash_combine // TODO use this again? Poly_hasher hasher; + // answer: no need to, since curve analyses are cached and therefore + // can be uniquely enumerated by ids std::size_t seed = p.first.id() + 0x9e3779b9; seed ^= p.second.id() + 0x9e3779b9 + (seed << 6) + (seed >> 2); return seed;