diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index e1eb20dcefd..88f5bbd3a3c 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -867,217 +867,6 @@ struct Exact_converter { return b; } }; -//____________________________________________________________ - - - -template -class Lazy_rep_with_vector_1 final - : public Lazy_rep, std::vector, E2A> - , private EC -{ - typedef std::vector AT; - typedef std::vector ET; - typedef Lazy_rep Base; - - mutable L1 l1_; - - const EC& ec() const { return *this; } - -public: - - void - update_exact() const - { - auto* p = new typename Base::Indirect(); - // TODO : This looks really unfinished... - std::vector vec; - //this->et->reserve(this->at.size()); - ec()(CGAL::exact(l1_), std::back_inserter(p->et_)); - this->set_at(p); - this->set_ptr(p); - // Prune lazy tree - lazy_reset_member(l1_); - } - - Lazy_rep_with_vector_1(const AC& ac, const EC& /*ec*/, const L1& l1) - : l1_(l1) - { - ac(CGAL::approx(l1), std::back_inserter(this->at_orig.at_)); - } - -#ifdef CGAL_LAZY_KERNEL_DEBUG - void - print_dag(std::ostream& os, int level) const - { - this->print_at_et(os, level); - os << "A Lazy_rep_with_vector_1 of size " << this->approx().size() << std::endl; - if(this->is_lazy()){ - CGAL::msg(os, level, "DAG with one child node:"); - CGAL::print_dag(l1_, os, level+1); - - } - } -#endif -}; - - -template -class Lazy_rep_with_vector_2 final - : public Lazy_rep, std::vector, E2A> - , private EC -{ - typedef std::vector AT; - typedef std::vector ET; - typedef Lazy_rep Base; - - mutable L1 l1_; - mutable L2 l2_; - - const EC& ec() const { return *this; } - -public: - - void - update_exact() const - { - auto* p = new typename Base::Indirect(); - p->et_.reserve(this->at_orig.at().size()); - ec()(CGAL::exact(l1_), CGAL::exact(l2_), std::back_inserter(p->et_)); - this->set_at(p); - this->set_ptr(p); - // Prune lazy tree - lazy_reset_member(l1_); - lazy_reset_member(l2_); - } - - Lazy_rep_with_vector_2(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2) - : l1_(l1), l2_(l2) - { - ac(CGAL::approx(l1), CGAL::approx(l2), std::back_inserter(this->at_orig.at_)); - } - -#ifdef CGAL_LAZY_KERNEL_DEBUG - void - print_dag(std::ostream& os, int level) const - { - this->print_at_et(os, level); - os << "A Lazy_rep_with_vector_2 of size " << this->approx().size() << std::endl; - if(this->is_lazy()){ - CGAL::msg(os, level, "DAG with two child nodes:"); - CGAL::print_dag(l1_, os, level+1); - CGAL::print_dag(l2_, os, level+1); - } - } -#endif -}; - - -template -class Lazy_rep_2_1 final - : public Lazy_rep - , private EC -{ - typedef typename R1::AT AT; - typedef typename R1::ET ET; - typedef Lazy_rep Base; - - mutable L1 l1_; - mutable L2 l2_; - - const EC& ec() const { return *this; } - -public: - - void - update_exact() const - { - auto* p = new typename Base::Indirect(); - ec()(CGAL::exact(l1_), CGAL::exact(l2_), p->et_); - this->set_at(p); - this->set_ptr(p); - // Prune lazy tree - lazy_reset_member(l1_); - lazy_reset_member(l2_); - } - - Lazy_rep_2_1(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2) - : Lazy_rep(), l1_(l1), l2_(l2) - { - this->set_depth((std::max)(CGAL::depth(l1), CGAL::depth(l2))); - ac(CGAL::approx(l1), CGAL::approx(l2), this->at_orig.at_); - } - -#ifdef CGAL_LAZY_KERNEL_DEBUG - void - print_dag(std::ostream& os, int level) const - { - this->print_at_et(os, level); - os << "A Lazy_rep_2_1" << std::endl; - if(this->is_lazy()){ - CGAL::msg(os, level, "DAG with two child nodes:"); - CGAL::print_dag(l1_, os, level+1); - CGAL::print_dag(l2_, os, level+1); - } - } -#endif -}; - - -//____________________________________________________________________________________ -// The following rep class stores two non-const reference parameters of type R1 and R2 - -template -class Lazy_rep_2_2 final - : public Lazy_rep, std::pair, E2A> - , private EC -{ - typedef std::pair AT; - typedef std::pair ET; - typedef Lazy_rep Base; - - mutable L1 l1_; - mutable L2 l2_; - - const EC& ec() const { return *this; } - -public: - - void - update_exact() const - { - auto* p = new typename Base::Indirect(); - ec()(CGAL::exact(l1_), CGAL::exact(l2_), p->et_.first, p->et_.second ); - this->set_at(p); - this->set_ptr(p); - // Prune lazy tree - lazy_reset_member(l1_); - lazy_reset_member(l2_); - } - - Lazy_rep_2_2(const AC& ac, const EC& /*ec*/, const L1& l1, const L2& l2) - : Lazy_rep(), l1_(l1), l2_(l2) - { - this->set_depth((std::max)(CGAL::depth(l1), CGAL::depth(l2))); - ac(CGAL::approx(l1), CGAL::approx(l2), this->at_orig.at_.first, this->at_orig.at_.second); - } - -#ifdef CGAL_LAZY_KERNEL_DEBUG - void - print_dag(std::ostream& os, int level) const - { - this->print_at_et(os, level); - os << "A Lazy_rep_2_2" << std::endl; - if(this->is_lazy()){ - CGAL::msg(os, level, "DAG with two child nodes:"); - CGAL::print_dag(l1_, os, level+1); - CGAL::print_dag(l2_, os, level+1); - } - } -#endif -}; - - //____________________________________________________________ // The handle class template