diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Certificate_generator.h b/Kinetic_data_structures/include/CGAL/Kinetic/Certificate_generator.h index 835e5e80cb3..9f2ba21f55b 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Certificate_generator.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Certificate_generator.h @@ -30,76 +30,107 @@ struct Certificate_generator { Certificate_generator(typename KK_t::Function_kernel fk): fk_(fk){} Certificate_generator(){} + enum When {AT, AFTER}; + + template + CGAL::Sign sign_at(const A &a, const B &b, const C &c, const D &d, const E &e, + const Time &begin) const { + return eval_sign_at(gen_(a,b,c,d,e), begin); + } + + + template + CGAL::Sign sign_after(const A &a, const B &b, const C &c, const D &d, const E &e, + const Time &begin) const { + //if (when==AFTER) { + return eval_sign_after(gen_(a, b, c, d, e), begin); + /*} elsee { + return sign_at(gen_(a,b,c,d,e), begin); + }*/ + } + + template + CGAL::Sign sign_at(const A &a, const B &b, const C &c, const D &d, + const Time &begin) const { + return eval_sign_at(gen_(a, b, c, d), begin); + } + + template + CGAL::Sign sign_after(const A &a, const B &b, const C &c, const D &d, + const Time &begin) const { + return eval_sign_after(gen_(a, b, c, d), begin); + } + + + template + CGAL::Sign sign_at(const A &a, const B &b, const C &c, + const Time &begin) const { + return eval_sign_at(gen_(a,b,c), begin); + } + + template + CGAL::Sign sign_after(const A &a, const B &b, const C &c, + const Time &begin) const { + return eval_sign_after(gen_(a,b,c), begin); + } + + + template + CGAL::Sign sign_at(const A &a, const B &b, + const Time &begin) const { + return eval_sign_at(gen_(a, b), begin); + } + template + CGAL::Sign sign_after(const A &a, const B &b, + const Time &begin) const { + return eval_sign_after(gen_(a, b), begin); + } + + template + CGAL::Sign sign_at(const A &a, const Time &begin) const { + return eval_sign_at(gen_(a), begin); + } + + template + CGAL::Sign sign_after(const A &a, const Time &begin) const { + return eval_sign_after(gen_(a), begin); + } template - result_type operator()(const A &a, const B &b, const C &c, const D &d, const E &e, const Time &begin, const Time &end) const { + result_type operator()(const A &a, const B &b, const C &c, const D &d, const E &e, + const Time &begin, const Time &end) const { return result_type(gen_(a, b, c, d, e), fk_, begin, end); } + template - result_type operator()(const A &a, const B &b, const C &c, const D &d, const Time &begin, const Time &end) const { + result_type operator()(const A &a, const B &b, const C &c, const D &d, + const Time &begin, const Time &end) const { return result_type(gen_(a, b, c, d), fk_, begin, end); } + template - result_type operator()(const A &a, const B &b, const C &c, const Time &begin, const Time &end) const { + result_type operator()(const A &a, const B &b, const C &c, const Time &begin, + const Time &end) const { return result_type(gen_(a, b, c), fk_, begin, end); } + template result_type operator()(const A &a, const B &b, const Time &begin, const Time &end) const { return result_type(gen_(a, b), fk_, begin, end); } + template result_type operator()(const A &a, const Time &begin, const Time &end) const { return result_type(gen_(a), fk_,begin,end); } - template - CGAL::Sign operator()(const A &a, const B &b, const C &c, const D &d, const E &e, const Time &begin, bool after=false) const { - if (after) { - return sign_after(gen_(a, b, c, d, e), begin); - } else { - return sign_at(gen_(a,b,c,d,e), begin); - } - } - template - CGAL::Sign operator()(const A &a, const B &b, const C &c, const D &d, const Time &begin, bool after=false) const { - if (after) { - return sign_after(gen_(a, b, c, d), begin); - } else { - return sign_at(gen_(a,b,c,d), begin); - } - } - template - CGAL::Sign operator()(const A &a, const B &b, const C &c, const Time &begin, bool after=false) const { - if (after) { - return sign_after(gen_(a, b, c), begin); - } else { - return sign_at(gen_(a,b,c), begin); - } - } - template - CGAL::Sign operator()(const A &a, const B &b, const Time &begin, bool after=false) const { - if (after) { - return sign_after(gen_(a, b), begin); - } else { - return sign_at(gen_(a, b), begin); - } - } - template - CGAL::Sign operator()(const A &a, const Time &begin, bool after=false) const { - if (after) { - return sign_after(gen_(a), begin); - } else { - return sign_at(gen_(a), begin); - } - } - protected: - CGAL::Sign sign_after(const typename KK_t::Function_kernel::Function &f, + CGAL::Sign eval_sign_after(const typename KK_t::Function_kernel::Function &f, const Time &t) const { return fk_.sign_after_object()(f,t); } - CGAL::Sign sign_at(const typename KK_t::Function_kernel::Function &f, + CGAL::Sign eval_sign_at(const typename KK_t::Function_kernel::Function &f, const Time &t) const { return fk_.sign_at_object()(f,t); }