mirror of https://github.com/CGAL/cgal
rm Number_type_traits
replace: Ring_tag -> Integral_domain_without_division_tag Sqrt_field_tag -> Field_with_sqrt_tag
This commit is contained in:
parent
ae3b5961c1
commit
f95d200030
|
|
@ -48,11 +48,11 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef CGAL::Sqrt_field_tag MTag;
|
typedef CGAL::Field_with_sqrt_tag MTag;
|
||||||
#ifdef CGAL_USE_CORE
|
#ifdef CGAL_USE_CORE
|
||||||
typedef CGAL::Sqrt_field_tag EMTag;
|
typedef CGAL::Field_with_sqrt_tag EMTag;
|
||||||
#else
|
#else
|
||||||
typedef CGAL::Ring_tag EMTag;
|
typedef CGAL::Integral_domain_without_division_tag EMTag;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef CGAL::Tag_false ITag;
|
typedef CGAL::Tag_false ITag;
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ struct Rep : public CGAL::Simple_cartesian<CORE::Expr> {};
|
||||||
|
|
||||||
#ifdef USE_FILTERED_TRAITS
|
#ifdef USE_FILTERED_TRAITS
|
||||||
#ifdef CGAL_USE_CORE
|
#ifdef CGAL_USE_CORE
|
||||||
typedef CGAL::Sqrt_field_tag MTag;
|
typedef CGAL::Field_with_sqrt_tag MTag;
|
||||||
typedef CGAL::Sqrt_field_tag EMTag;
|
typedef CGAL::Field_with_sqrt_tag EMTag;
|
||||||
typedef CGAL::Simple_cartesian<CORE::Expr> ERep;
|
typedef CGAL::Simple_cartesian<CORE::Expr> ERep;
|
||||||
struct Gt
|
struct Gt
|
||||||
: public CGAL::Segment_Delaunay_graph_filtered_traits_2<Rep,
|
: public CGAL::Segment_Delaunay_graph_filtered_traits_2<Rep,
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ typedef CGAL::Simple_cartesian<ENT> EK;
|
||||||
#include <CGAL/Segment_Delaunay_graph_2.h>
|
#include <CGAL/Segment_Delaunay_graph_2.h>
|
||||||
|
|
||||||
typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<CK,
|
typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<CK,
|
||||||
/* The construction kernel allows for / and sqrt */ CGAL::Sqrt_field_tag,
|
/* The construction kernel allows for / and sqrt */ CGAL::Field_with_sqrt_tag,
|
||||||
EK,
|
EK,
|
||||||
/* The exact kernel supports field ops exactly */ CGAL::Field_tag> Gt;
|
/* The exact kernel supports field ops exactly */ CGAL::Field_tag> Gt;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1239,20 +1239,20 @@ protected:
|
||||||
|
|
||||||
// types
|
// types
|
||||||
typedef
|
typedef
|
||||||
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_circle_2<Gt,Ring_tag>
|
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_circle_2<Gt,Integral_domain_without_division_tag>
|
||||||
Construct_sdg_circle_2;
|
Construct_sdg_circle_2;
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_bisector_2<Gt,Ring_tag>
|
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_bisector_2<Gt,Integral_domain_without_division_tag>
|
||||||
Construct_sdg_bisector_2;
|
Construct_sdg_bisector_2;
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_bisector_ray_2<Gt,Ring_tag>
|
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Construct_sdg_bisector_ray_2<Gt,Integral_domain_without_division_tag>
|
||||||
Construct_sdg_bisector_ray_2;
|
Construct_sdg_bisector_ray_2;
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::
|
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::
|
||||||
Construct_sdg_bisector_segment_2<Gt,Ring_tag>
|
Construct_sdg_bisector_segment_2<Gt,Integral_domain_without_division_tag>
|
||||||
Construct_sdg_bisector_segment_2;
|
Construct_sdg_bisector_segment_2;
|
||||||
|
|
||||||
// access
|
// access
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/basic.h>
|
#include <CGAL/Segment_Delaunay_graph_2/basic.h>
|
||||||
#include <CGAL/enum.h>
|
#include <CGAL/enum.h>
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/Sqrt_extension_1.h>
|
#include <CGAL/Segment_Delaunay_graph_2/Sqrt_extension_1.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h>
|
#include <CGAL/Segment_Delaunay_graph_2/Sqrt_extension_2.h>
|
||||||
|
|
||||||
|
|
@ -58,8 +57,8 @@ public:
|
||||||
typedef CGAL::Sqrt_extension_2<RT> Sqrt_2;
|
typedef CGAL::Sqrt_extension_2<RT> Sqrt_2;
|
||||||
typedef CGAL::Sqrt_extension_2<Sqrt_1> Sqrt_3;
|
typedef CGAL::Sqrt_extension_2<Sqrt_1> Sqrt_3;
|
||||||
|
|
||||||
typedef typename Number_type_traits<RT>::Has_sqrt RT_Has_sqrt;
|
typedef Boolean_tag<CGALi::Is_field_with_sqrt<RT>::value> RT_Has_sqrt;
|
||||||
typedef typename Number_type_traits<FT>::Has_sqrt FT_Has_sqrt;
|
typedef Boolean_tag<CGALi::Is_field_with_sqrt<FT>::value> FT_Has_sqrt;
|
||||||
|
|
||||||
static const RT_Has_sqrt& rt_has_sqrt() {
|
static const RT_Has_sqrt& rt_has_sqrt() {
|
||||||
static RT_Has_sqrt has_sqrt;
|
static RT_Has_sqrt has_sqrt;
|
||||||
|
|
|
||||||
|
|
@ -186,8 +186,7 @@ private:
|
||||||
|
|
||||||
static Point_2 midpoint(const Point_2& p, const Point_2& q) {
|
static Point_2 midpoint(const Point_2& p, const Point_2& q) {
|
||||||
typedef typename Gt::FT FT;
|
typedef typename Gt::FT FT;
|
||||||
static typename Number_type_traits<FT>::Has_division has_division;
|
return midpoint(p, q, Boolean_tag<CGALi::Is_field<FT>::value>());
|
||||||
return midpoint(p, q, has_division);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@
|
||||||
#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
|
#ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
|
||||||
#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
|
#define CGAL_SEGMENT_DELAUNAY_GRAPH_2_FILTERED_TRAITS_BASE_2_H
|
||||||
|
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/basic.h>
|
#include <CGAL/Segment_Delaunay_graph_2/basic.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/Traits_base_2.h>
|
#include <CGAL/Segment_Delaunay_graph_2/Traits_base_2.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
|
#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
|
||||||
|
|
|
||||||
|
|
@ -34,26 +34,26 @@ namespace Internal {
|
||||||
struct Concept_check_tags {};
|
struct Concept_check_tags {};
|
||||||
|
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags<D,Ring_tag,2>
|
struct Concept_check_tags<D,Integral_domain_without_division_tag,2>
|
||||||
{
|
{
|
||||||
Concept_check_tags() {
|
Concept_check_tags() {
|
||||||
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Sqrt_field_tag
|
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags<D,Ring_tag,4> {
|
struct Concept_check_tags<D,Integral_domain_without_division_tag,4> {
|
||||||
Concept_check_tags() {
|
Concept_check_tags() {
|
||||||
THE_4TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Sqrt_field_tag
|
THE_4TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags<D,Ring_tag,6> {
|
struct Concept_check_tags<D,Integral_domain_without_division_tag,6> {
|
||||||
Concept_check_tags() {
|
Concept_check_tags() {
|
||||||
THE_6TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Sqrt_field_tag
|
THE_6TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -64,7 +64,7 @@ namespace Internal {
|
||||||
struct Concept_check_tags<D,Euclidean_ring_tag,2>
|
struct Concept_check_tags<D,Euclidean_ring_tag,2>
|
||||||
{
|
{
|
||||||
Concept_check_tags() {
|
Concept_check_tags() {
|
||||||
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Sqrt_field_tag
|
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -72,7 +72,7 @@ namespace Internal {
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags<D,Euclidean_ring_tag,4> {
|
struct Concept_check_tags<D,Euclidean_ring_tag,4> {
|
||||||
Concept_check_tags() {
|
Concept_check_tags() {
|
||||||
THE_4TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Sqrt_field_tag
|
THE_4TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -80,7 +80,7 @@ namespace Internal {
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags<D,Euclidean_ring_tag,6> {
|
struct Concept_check_tags<D,Euclidean_ring_tag,6> {
|
||||||
Concept_check_tags() {
|
Concept_check_tags() {
|
||||||
THE_6TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Sqrt_field_tag
|
THE_6TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -94,7 +94,7 @@ namespace Internal {
|
||||||
struct Concept_check_tags_wi<D,Field_tag,2>
|
struct Concept_check_tags_wi<D,Field_tag,2>
|
||||||
{
|
{
|
||||||
Concept_check_tags_wi() {
|
Concept_check_tags_wi() {
|
||||||
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Ring_tag_OR_Sqrt_field_tag
|
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -102,7 +102,7 @@ namespace Internal {
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags_wi<D,Field_tag,4> {
|
struct Concept_check_tags_wi<D,Field_tag,4> {
|
||||||
Concept_check_tags_wi() {
|
Concept_check_tags_wi() {
|
||||||
THE_4TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Ring_tag_OR_Sqrt_field_tag
|
THE_4TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -110,7 +110,7 @@ namespace Internal {
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags_wi<D,Field_tag,6> {
|
struct Concept_check_tags_wi<D,Field_tag,6> {
|
||||||
Concept_check_tags_wi() {
|
Concept_check_tags_wi() {
|
||||||
THE_6TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Ring_tag_OR_Sqrt_field_tag
|
THE_6TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -121,7 +121,7 @@ namespace Internal {
|
||||||
struct Concept_check_tags_wi<D,Euclidean_ring_tag,2>
|
struct Concept_check_tags_wi<D,Euclidean_ring_tag,2>
|
||||||
{
|
{
|
||||||
Concept_check_tags_wi() {
|
Concept_check_tags_wi() {
|
||||||
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Ring_tag_OR_Sqrt_field_tag
|
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -129,7 +129,7 @@ namespace Internal {
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags_wi<D,Euclidean_ring_tag,4> {
|
struct Concept_check_tags_wi<D,Euclidean_ring_tag,4> {
|
||||||
Concept_check_tags_wi() {
|
Concept_check_tags_wi() {
|
||||||
THE_4TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Ring_tag_OR_Sqrt_field_tag
|
THE_4TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -137,7 +137,7 @@ namespace Internal {
|
||||||
template<class D>
|
template<class D>
|
||||||
struct Concept_check_tags_wi<D,Euclidean_ring_tag,6> {
|
struct Concept_check_tags_wi<D,Euclidean_ring_tag,6> {
|
||||||
Concept_check_tags_wi() {
|
Concept_check_tags_wi() {
|
||||||
THE_6TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Ring_tag_OR_Sqrt_field_tag
|
THE_6TH_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
|
||||||
( D() );
|
( D() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -286,127 +286,6 @@ public:
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
struct Number_type_traits< Sqrt_extension_1<NT> >
|
|
||||||
{
|
|
||||||
|
|
||||||
static inline
|
|
||||||
std::pair<double,double> to_interval(const Sqrt_extension_1<NT>& x) {
|
|
||||||
return x.to_interval();
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool is_positive(const Sqrt_extension_1<NT>& x) {
|
|
||||||
return x.sign() == POSITIVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool is_negative(const Sqrt_extension_1<NT>& x) {
|
|
||||||
return x.sign() == NEGATIVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool is_zero(const Sqrt_extension_1<NT>& x) {
|
|
||||||
return x.sign() == ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline Sign sign(const Sqrt_extension_1<NT>& x) {
|
|
||||||
return x.sign();
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline Sqrt_extension_1<NT> square(const Sqrt_extension_1<NT>& x) {
|
|
||||||
return x.square();
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline
|
|
||||||
Comparison_result compare(const Sqrt_extension_1<NT>& x,
|
|
||||||
const Sqrt_extension_1<NT>& y) {
|
|
||||||
CGAL_exactness_precondition( CGAL::compare(x.c(), y.c()) == EQUAL );
|
|
||||||
|
|
||||||
// Sign s = CGAL::sign(x - y);
|
|
||||||
Sign s = (x - y).sign();
|
|
||||||
|
|
||||||
if ( s == ZERO ) { return EQUAL; }
|
|
||||||
return (s == POSITIVE) ? LARGER : SMALLER;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline double to_double(const Sqrt_extension_1<NT>& x) {
|
|
||||||
return x.to_double();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
std::pair<double,double>
|
|
||||||
to_interval(const Sqrt_extension_1<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_1<NT> >::to_interval(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
bool
|
|
||||||
is_positive(const Sqrt_extension_1<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_1<NT> >::is_positive(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
bool
|
|
||||||
is_negative(const Sqrt_extension_1<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_1<NT> >::is_negative(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
bool
|
|
||||||
is_zero(const Sqrt_extension_1<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_1<NT> >::is_zero(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
Sign
|
|
||||||
sign(const Sqrt_extension_1<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_1<NT> >::sign(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
Sqrt_extension_1<NT>
|
|
||||||
square(const Sqrt_extension_1<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_1<NT> >::square(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
Comparison_result
|
|
||||||
compare(const Sqrt_extension_1<NT>& x, const Sqrt_extension_1<NT>& y)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_1<NT> >::compare(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
double
|
|
||||||
to_double(const Sqrt_extension_1<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_1<NT> >::to_double(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
// operator <<
|
// operator <<
|
||||||
template<class Stream, class NT>
|
template<class Stream, class NT>
|
||||||
inline
|
inline
|
||||||
|
|
|
||||||
|
|
@ -117,9 +117,9 @@ public:
|
||||||
Sqrt_1 x(a0_, a1_, A_);
|
Sqrt_1 x(a0_, a1_, A_);
|
||||||
Sqrt_1 y(a2_, a3_, A_);
|
Sqrt_1 y(a2_, a3_, A_);
|
||||||
|
|
||||||
Sign s_x = Number_type_traits<Sqrt_1>::sign(x);
|
Sign s_x = CGAL_NTS sign(x);
|
||||||
Sign s_y = Number_type_traits<Sqrt_1>::sign(y);
|
Sign s_y = CGAL_NTS sign(y);
|
||||||
Sign s_B = Number_type_traits<Sqrt_1>::sign(B_);
|
Sign s_B = CGAL_NTS sign(B_);
|
||||||
|
|
||||||
if ( s_B == ZERO ) {
|
if ( s_B == ZERO ) {
|
||||||
return s_x;
|
return s_x;
|
||||||
|
|
@ -131,7 +131,7 @@ public:
|
||||||
return s_x;
|
return s_x;
|
||||||
} else {
|
} else {
|
||||||
Sqrt_1 Q = CGAL::square(x) - CGAL::square(y) * B_;
|
Sqrt_1 Q = CGAL::square(x) - CGAL::square(y) * B_;
|
||||||
return Sign(s_x * Number_type_traits<Sqrt_1>::sign(Q));
|
return Sign(s_x * CGAL_NTS sign(Q));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,7 +282,8 @@ public:
|
||||||
CGAL::Comparison_result operator()(
|
CGAL::Comparison_result operator()(
|
||||||
const Real_embeddable& x,
|
const Real_embeddable& x,
|
||||||
const Real_embeddable& y) const {
|
const Real_embeddable& y) const {
|
||||||
CGAL_exactness_precondition( CGAL::compare(x.c(), y.c()) == EQUAL );
|
CGAL_exactness_precondition( CGAL::compare(x.e(), y.e()) == EQUAL );
|
||||||
|
CGAL_exactness_precondition( CGAL::compare(x.f(), y.f()) == EQUAL );
|
||||||
return (x - y).sign();
|
return (x - y).sign();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -304,94 +305,6 @@ public:
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
struct Number_type_traits< Sqrt_extension_2<NT> >
|
|
||||||
{
|
|
||||||
static inline bool is_positive(const Sqrt_extension_2<NT>& x) {
|
|
||||||
return x.sign() == POSITIVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool is_negative(const Sqrt_extension_2<NT>& x) {
|
|
||||||
return x.sign() == NEGATIVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool is_zero(const Sqrt_extension_2<NT>& x) {
|
|
||||||
return x.sign() == ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline Sign sign(const Sqrt_extension_2<NT>& x) {
|
|
||||||
return x.sign();
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline Sqrt_extension_2<NT> square(const Sqrt_extension_2<NT>& x) {
|
|
||||||
return x.square();
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline
|
|
||||||
Comparison_result compare(const Sqrt_extension_2<NT>& x,
|
|
||||||
const Sqrt_extension_2<NT>& y)
|
|
||||||
{
|
|
||||||
CGAL_exactness_precondition( CGAL::compare(x.e(), y.e()) == EQUAL );
|
|
||||||
CGAL_exactness_precondition( CGAL::compare(x.f(), y.f()) == EQUAL );
|
|
||||||
|
|
||||||
// Sign s = CGAL::sign(x - y);
|
|
||||||
Sign s = (x - y).sign();
|
|
||||||
|
|
||||||
if ( s == ZERO ) { return EQUAL; }
|
|
||||||
return (s == POSITIVE) ? LARGER : SMALLER;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
bool
|
|
||||||
is_positive(const Sqrt_extension_2<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_2<NT> >::is_positive(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
bool
|
|
||||||
is_negative(const Sqrt_extension_2<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_2<NT> >::is_negative(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
bool
|
|
||||||
is_zero(const Sqrt_extension_2<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_2<NT> >::is_zero(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
Sign
|
|
||||||
sign(const Sqrt_extension_2<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_2<NT> >::sign(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
Sqrt_extension_2<NT>
|
|
||||||
square(const Sqrt_extension_2<NT>& x)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_2<NT> >::square(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class NT>
|
|
||||||
inline
|
|
||||||
Comparison_result
|
|
||||||
compare(const Sqrt_extension_2<NT>& x,
|
|
||||||
const Sqrt_extension_2<NT>& y)
|
|
||||||
{
|
|
||||||
return Number_type_traits< Sqrt_extension_2<NT> >::compare(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
// operator <<
|
// operator <<
|
||||||
template<class Stream, class NT>
|
template<class Stream, class NT>
|
||||||
inline
|
inline
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
|
#include <CGAL/Segment_Delaunay_graph_2/Kernel_wrapper_2.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/basic.h>
|
#include <CGAL/Segment_Delaunay_graph_2/basic.h>
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h>
|
#include <CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h>
|
#include <CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h>
|
||||||
|
|
||||||
|
|
@ -38,13 +37,13 @@ namespace Internal {
|
||||||
template<class K,class M> struct Which_Voronoi_vertex_base_C2;
|
template<class K,class M> struct Which_Voronoi_vertex_base_C2;
|
||||||
|
|
||||||
template<class K>
|
template<class K>
|
||||||
struct Which_Voronoi_vertex_base_C2<K,Ring_tag>
|
struct Which_Voronoi_vertex_base_C2<K,Integral_domain_without_division_tag>
|
||||||
{
|
{
|
||||||
typedef Voronoi_vertex_ring_C2<K> Base;
|
typedef Voronoi_vertex_ring_C2<K> Base;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class K>
|
template<class K>
|
||||||
struct Which_Voronoi_vertex_base_C2<K,Sqrt_field_tag>
|
struct Which_Voronoi_vertex_base_C2<K,Field_with_sqrt_tag>
|
||||||
{
|
{
|
||||||
typedef Voronoi_vertex_sqrt_field_C2<K> Base;
|
typedef Voronoi_vertex_sqrt_field_C2<K> Base;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1379,13 +1379,11 @@ public:
|
||||||
inline FT y(const Tag_true&) const { return hy() / hw(); }
|
inline FT y(const Tag_true&) const { return hy() / hw(); }
|
||||||
|
|
||||||
inline FT x() const {
|
inline FT x() const {
|
||||||
static typename Number_type_traits<FT>::Has_division has_division;
|
return x(Boolean_tag<CGALi::Is_field<FT>::value>());
|
||||||
return x(has_division);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline FT y() const {
|
inline FT y() const {
|
||||||
static typename Number_type_traits<FT>::Has_division has_division;
|
return y(Boolean_tag<CGALi::Is_field<FT>::value>());
|
||||||
return y(has_division);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FT hx() const {
|
FT hx() const {
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ CGAL_BEGIN_NAMESPACE
|
||||||
|
|
||||||
// this traits class does support intersecting segments
|
// this traits class does support intersecting segments
|
||||||
template<class CK,
|
template<class CK,
|
||||||
class CK_MTag = Sqrt_field_tag,
|
class CK_MTag = Field_with_sqrt_tag,
|
||||||
#ifdef CGAL_USE_GMP
|
#ifdef CGAL_USE_GMP
|
||||||
class EK = Simple_cartesian< Gmpq >,
|
class EK = Simple_cartesian< Gmpq >,
|
||||||
#else
|
#else
|
||||||
|
|
@ -66,7 +66,7 @@ template<class CK,
|
||||||
#endif
|
#endif
|
||||||
class EK_MTag = Field_tag,
|
class EK_MTag = Field_tag,
|
||||||
class FK = Simple_cartesian< Interval_nt<false> >,
|
class FK = Simple_cartesian< Interval_nt<false> >,
|
||||||
class FK_MTag = Sqrt_field_tag,
|
class FK_MTag = Field_with_sqrt_tag,
|
||||||
class C2E = Cartesian_converter<CK, EK>,
|
class C2E = Cartesian_converter<CK, EK>,
|
||||||
#if defined(__sun) && defined(__SUNPRO_CC)
|
#if defined(__sun) && defined(__SUNPRO_CC)
|
||||||
class C2F = SDG2_INS::SUNPRO_CC_Interval_converter<CK, FK> >
|
class C2F = SDG2_INS::SUNPRO_CC_Interval_converter<CK, FK> >
|
||||||
|
|
@ -83,9 +83,9 @@ struct Segment_Delaunay_graph_filtered_traits_2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Segment_Delaunay_graph_filtered_traits_2() {
|
Segment_Delaunay_graph_filtered_traits_2() {
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,CK_MTag,2>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,CK_MTag,2>();
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,EK_MTag,4>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,EK_MTag,4>();
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,FK_MTag,6>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,FK_MTag,6>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, Field_tag,
|
||||||
EK, EK_MTag,
|
EK, EK_MTag,
|
||||||
FK, FK_MTag,
|
FK, FK_MTag,
|
||||||
C2E, C2F>
|
C2E, C2F>
|
||||||
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, Ring_tag,
|
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, Integral_domain_without_division_tag,
|
||||||
EK, EK_MTag,
|
EK, EK_MTag,
|
||||||
FK, FK_MTag,
|
FK, FK_MTag,
|
||||||
C2E, C2F,
|
C2E, C2F,
|
||||||
|
|
@ -104,8 +104,8 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, Field_tag,
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Segment_Delaunay_graph_filtered_traits_2() {
|
Segment_Delaunay_graph_filtered_traits_2() {
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,EK_MTag,4>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,EK_MTag,4>();
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,FK_MTag,6>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,FK_MTag,6>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -116,15 +116,15 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, CK_MTag,
|
||||||
FK, FK_MTag,
|
FK, FK_MTag,
|
||||||
C2E, C2F>
|
C2E, C2F>
|
||||||
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, CK_MTag,
|
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, CK_MTag,
|
||||||
EK, Ring_tag,
|
EK, Integral_domain_without_division_tag,
|
||||||
FK, FK_MTag,
|
FK, FK_MTag,
|
||||||
C2E, C2F,
|
C2E, C2F,
|
||||||
Tag_true>
|
Tag_true>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Segment_Delaunay_graph_filtered_traits_2() {
|
Segment_Delaunay_graph_filtered_traits_2() {
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,CK_MTag,2>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,CK_MTag,2>();
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,FK_MTag,6>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,FK_MTag,6>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -136,14 +136,14 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, CK_MTag,
|
||||||
C2E, C2F>
|
C2E, C2F>
|
||||||
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, CK_MTag,
|
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, CK_MTag,
|
||||||
EK, EK_MTag,
|
EK, EK_MTag,
|
||||||
FK, Ring_tag,
|
FK, Integral_domain_without_division_tag,
|
||||||
C2E, C2F,
|
C2E, C2F,
|
||||||
Tag_true>
|
Tag_true>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Segment_Delaunay_graph_filtered_traits_2() {
|
Segment_Delaunay_graph_filtered_traits_2() {
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,CK_MTag,2>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,CK_MTag,2>();
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,EK_MTag,4>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,EK_MTag,4>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -154,14 +154,14 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, CK_MTag,
|
||||||
FK, Field_tag,
|
FK, Field_tag,
|
||||||
C2E, C2F>
|
C2E, C2F>
|
||||||
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, CK_MTag,
|
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, CK_MTag,
|
||||||
EK, Ring_tag,
|
EK, Integral_domain_without_division_tag,
|
||||||
FK, Ring_tag,
|
FK, Integral_domain_without_division_tag,
|
||||||
C2E, C2F,
|
C2E, C2F,
|
||||||
Tag_true>
|
Tag_true>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Segment_Delaunay_graph_filtered_traits_2() {
|
Segment_Delaunay_graph_filtered_traits_2() {
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,CK_MTag,2>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,CK_MTag,2>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -171,15 +171,15 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, Field_tag,
|
||||||
EK, EK_MTag,
|
EK, EK_MTag,
|
||||||
FK, Field_tag,
|
FK, Field_tag,
|
||||||
C2E, C2F>
|
C2E, C2F>
|
||||||
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, Ring_tag,
|
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, Integral_domain_without_division_tag,
|
||||||
EK, EK_MTag,
|
EK, EK_MTag,
|
||||||
FK, Ring_tag,
|
FK, Integral_domain_without_division_tag,
|
||||||
C2E, C2F,
|
C2E, C2F,
|
||||||
Tag_true>
|
Tag_true>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Segment_Delaunay_graph_filtered_traits_2() {
|
Segment_Delaunay_graph_filtered_traits_2() {
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,EK_MTag,4>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,EK_MTag,4>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -189,15 +189,15 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, Field_tag,
|
||||||
EK, Field_tag,
|
EK, Field_tag,
|
||||||
FK, FK_MTag,
|
FK, FK_MTag,
|
||||||
C2E, C2F>
|
C2E, C2F>
|
||||||
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, Ring_tag,
|
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, Integral_domain_without_division_tag,
|
||||||
EK, Ring_tag,
|
EK, Integral_domain_without_division_tag,
|
||||||
FK, FK_MTag,
|
FK, FK_MTag,
|
||||||
C2E, C2F,
|
C2E, C2F,
|
||||||
Tag_true>
|
Tag_true>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Segment_Delaunay_graph_filtered_traits_2() {
|
Segment_Delaunay_graph_filtered_traits_2() {
|
||||||
SDG2_INS::Concept_check_tags<Ring_tag,FK_MTag,6>();
|
SDG2_INS::Concept_check_tags<Integral_domain_without_division_tag,FK_MTag,6>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -206,9 +206,9 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, Field_tag,
|
||||||
EK, Field_tag,
|
EK, Field_tag,
|
||||||
FK, Field_tag,
|
FK, Field_tag,
|
||||||
C2E, C2F>
|
C2E, C2F>
|
||||||
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, Ring_tag,
|
: public Segment_Delaunay_graph_filtered_traits_base_2<CK, Integral_domain_without_division_tag,
|
||||||
EK, Ring_tag,
|
EK, Integral_domain_without_division_tag,
|
||||||
FK, Ring_tag,
|
FK, Integral_domain_without_division_tag,
|
||||||
C2E, C2F,
|
C2E, C2F,
|
||||||
Tag_true>
|
Tag_true>
|
||||||
{};
|
{};
|
||||||
|
|
@ -218,15 +218,15 @@ struct Segment_Delaunay_graph_filtered_traits_2<CK, Field_tag,
|
||||||
|
|
||||||
// this traits class does NOT support intersecting segments
|
// this traits class does NOT support intersecting segments
|
||||||
template<class CK,
|
template<class CK,
|
||||||
class CK_MTag = Sqrt_field_tag,
|
class CK_MTag = Field_with_sqrt_tag,
|
||||||
#ifdef CGAL_USE_GMP
|
#ifdef CGAL_USE_GMP
|
||||||
class EK = Simple_cartesian< Gmpq >,
|
class EK = Simple_cartesian< Gmpq >,
|
||||||
#else
|
#else
|
||||||
class EK = Simple_cartesian< MP_Float >,
|
class EK = Simple_cartesian< MP_Float >,
|
||||||
#endif
|
#endif
|
||||||
class EK_MTag = Ring_tag,
|
class EK_MTag = Integral_domain_without_division_tag,
|
||||||
class FK = Simple_cartesian< Interval_nt<false> >,
|
class FK = Simple_cartesian< Interval_nt<false> >,
|
||||||
class FK_MTag = Sqrt_field_tag,
|
class FK_MTag = Field_with_sqrt_tag,
|
||||||
class C2E = Cartesian_converter<CK, EK>,
|
class C2E = Cartesian_converter<CK, EK>,
|
||||||
#if defined(__sun) && defined(__SUNPRO_CC)
|
#if defined(__sun) && defined(__SUNPRO_CC)
|
||||||
class C2F = SDG2_INS::SUNPRO_CC_Interval_converter<CK, FK> >
|
class C2F = SDG2_INS::SUNPRO_CC_Interval_converter<CK, FK> >
|
||||||
|
|
@ -242,9 +242,9 @@ struct Segment_Delaunay_graph_filtered_traits_without_intersections_2
|
||||||
Tag_false>
|
Tag_false>
|
||||||
{
|
{
|
||||||
Segment_Delaunay_graph_filtered_traits_without_intersections_2() {
|
Segment_Delaunay_graph_filtered_traits_without_intersections_2() {
|
||||||
SDG2_INS::Concept_check_tags_wi<Ring_tag,CK_MTag,2>();
|
SDG2_INS::Concept_check_tags_wi<Integral_domain_without_division_tag,CK_MTag,2>();
|
||||||
SDG2_INS::Concept_check_tags_wi<Ring_tag,EK_MTag,4>();
|
SDG2_INS::Concept_check_tags_wi<Integral_domain_without_division_tag,EK_MTag,4>();
|
||||||
SDG2_INS::Concept_check_tags_wi<Ring_tag,FK_MTag,6>();
|
SDG2_INS::Concept_check_tags_wi<Integral_domain_without_division_tag,FK_MTag,6>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/basic.h>
|
#include <CGAL/Segment_Delaunay_graph_2/basic.h>
|
||||||
|
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2/Traits_base_2.h>
|
#include <CGAL/Segment_Delaunay_graph_2/Traits_base_2.h>
|
||||||
|
|
||||||
#include <CGAL/Filtered_kernel.h>
|
#include <CGAL/Filtered_kernel.h>
|
||||||
|
|
@ -45,26 +44,26 @@ struct Segment_Delaunay_graph_traits_2
|
||||||
|
|
||||||
template<class R>
|
template<class R>
|
||||||
struct Segment_Delaunay_graph_traits_2<R,Field_tag>
|
struct Segment_Delaunay_graph_traits_2<R,Field_tag>
|
||||||
: public Segment_Delaunay_graph_traits_base_2<R,Ring_tag,Tag_true> {};
|
: public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_true> {};
|
||||||
|
|
||||||
|
|
||||||
// Concept checking
|
// Concept checking
|
||||||
template<class R>
|
template<class R>
|
||||||
struct Segment_Delaunay_graph_traits_2<R,Ring_tag>
|
struct Segment_Delaunay_graph_traits_2<R,Integral_domain_without_division_tag>
|
||||||
: public Segment_Delaunay_graph_traits_base_2<R,Ring_tag,Tag_true>
|
: public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_true>
|
||||||
{
|
{
|
||||||
Segment_Delaunay_graph_traits_2() {
|
Segment_Delaunay_graph_traits_2() {
|
||||||
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Sqrt_field_tag
|
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
|
||||||
( R() );
|
( R() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class R>
|
template<class R>
|
||||||
struct Segment_Delaunay_graph_traits_2<R,Euclidean_ring_tag>
|
struct Segment_Delaunay_graph_traits_2<R,Euclidean_ring_tag>
|
||||||
: public Segment_Delaunay_graph_traits_base_2<R,Ring_tag,Tag_true>
|
: public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_true>
|
||||||
{
|
{
|
||||||
Segment_Delaunay_graph_traits_2() {
|
Segment_Delaunay_graph_traits_2() {
|
||||||
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Sqrt_field_tag
|
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Field_tag_OR_Field_with_sqrt_tag
|
||||||
( R() );
|
( R() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -77,32 +76,32 @@ struct Segment_Delaunay_graph_traits_2<Filtered_kernel<R>,Field_tag>
|
||||||
typename Filtered_kernel<R>::EK,
|
typename Filtered_kernel<R>::EK,
|
||||||
Field_tag,
|
Field_tag,
|
||||||
typename Filtered_kernel<R>::FK,
|
typename Filtered_kernel<R>::FK,
|
||||||
Sqrt_field_tag>
|
Field_with_sqrt_tag>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
template<class R>
|
template<class R>
|
||||||
struct Segment_Delaunay_graph_traits_2<Filtered_kernel<R>,Sqrt_field_tag>
|
struct Segment_Delaunay_graph_traits_2<Filtered_kernel<R>,Field_with_sqrt_tag>
|
||||||
: public
|
: public
|
||||||
Segment_Delaunay_graph_filtered_traits_2<R,Sqrt_field_tag,
|
Segment_Delaunay_graph_filtered_traits_2<R,Field_with_sqrt_tag,
|
||||||
typename Filtered_kernel<R>::EK,
|
typename Filtered_kernel<R>::EK,
|
||||||
Field_tag,
|
Field_tag,
|
||||||
typename Filtered_kernel<R>::FK,
|
typename Filtered_kernel<R>::FK,
|
||||||
Sqrt_field_tag>
|
Field_with_sqrt_tag>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
||||||
// this traits class does NOT support intersecting segments
|
// this traits class does NOT support intersecting segments
|
||||||
template<class R, class MTag = Ring_tag>
|
template<class R, class MTag = Integral_domain_without_division_tag>
|
||||||
struct Segment_Delaunay_graph_traits_without_intersections_2
|
struct Segment_Delaunay_graph_traits_without_intersections_2
|
||||||
: public Segment_Delaunay_graph_traits_base_2<R,MTag,Tag_false> {};
|
: public Segment_Delaunay_graph_traits_base_2<R,MTag,Tag_false> {};
|
||||||
|
|
||||||
template<class R>
|
template<class R>
|
||||||
struct Segment_Delaunay_graph_traits_without_intersections_2<R,Field_tag>
|
struct Segment_Delaunay_graph_traits_without_intersections_2<R,Field_tag>
|
||||||
: public Segment_Delaunay_graph_traits_base_2<R,Ring_tag,Tag_false>
|
: public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_false>
|
||||||
{
|
{
|
||||||
Segment_Delaunay_graph_traits_without_intersections_2() {
|
Segment_Delaunay_graph_traits_without_intersections_2() {
|
||||||
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Ring_tag_OR_Sqrt_field_tag
|
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
|
||||||
( R() );
|
( R() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -110,10 +109,10 @@ struct Segment_Delaunay_graph_traits_without_intersections_2<R,Field_tag>
|
||||||
template<class R>
|
template<class R>
|
||||||
struct
|
struct
|
||||||
Segment_Delaunay_graph_traits_without_intersections_2<R,Euclidean_ring_tag>
|
Segment_Delaunay_graph_traits_without_intersections_2<R,Euclidean_ring_tag>
|
||||||
: public Segment_Delaunay_graph_traits_base_2<R,Ring_tag,Tag_false>
|
: public Segment_Delaunay_graph_traits_base_2<R,Integral_domain_without_division_tag,Tag_false>
|
||||||
{
|
{
|
||||||
Segment_Delaunay_graph_traits_without_intersections_2() {
|
Segment_Delaunay_graph_traits_without_intersections_2() {
|
||||||
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Ring_tag_OR_Sqrt_field_tag
|
THE_2ND_TEMPLATE_PARAMETER_MUST_EITHER_BE_Integral_domain_without_division_tag_OR_Field_with_sqrt_tag
|
||||||
( R() );
|
( R() );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -123,26 +122,26 @@ Segment_Delaunay_graph_traits_without_intersections_2<R,Euclidean_ring_tag>
|
||||||
template<class R>
|
template<class R>
|
||||||
struct
|
struct
|
||||||
Segment_Delaunay_graph_traits_without_intersections_2<Filtered_kernel<R>,
|
Segment_Delaunay_graph_traits_without_intersections_2<Filtered_kernel<R>,
|
||||||
Ring_tag>
|
Integral_domain_without_division_tag>
|
||||||
: public
|
: public
|
||||||
Segment_Delaunay_graph_filtered_traits_without_intersections_2<R,Ring_tag,
|
Segment_Delaunay_graph_filtered_traits_without_intersections_2<R,Integral_domain_without_division_tag,
|
||||||
typename Filtered_kernel<R>::EK,
|
typename Filtered_kernel<R>::EK,
|
||||||
Ring_tag,
|
Integral_domain_without_division_tag,
|
||||||
typename Filtered_kernel<R>::FK,
|
typename Filtered_kernel<R>::FK,
|
||||||
Sqrt_field_tag>
|
Field_with_sqrt_tag>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
template<class R>
|
template<class R>
|
||||||
struct
|
struct
|
||||||
Segment_Delaunay_graph_traits_without_intersections_2<Filtered_kernel<R>,
|
Segment_Delaunay_graph_traits_without_intersections_2<Filtered_kernel<R>,
|
||||||
Sqrt_field_tag>
|
Field_with_sqrt_tag>
|
||||||
: public
|
: public
|
||||||
Segment_Delaunay_graph_filtered_traits_without_intersections_2<R,
|
Segment_Delaunay_graph_filtered_traits_without_intersections_2<R,
|
||||||
Sqrt_field_tag,
|
Field_with_sqrt_tag,
|
||||||
typename Filtered_kernel<R>::EK,
|
typename Filtered_kernel<R>::EK,
|
||||||
Ring_tag,
|
Integral_domain_without_division_tag,
|
||||||
typename Filtered_kernel<R>::FK,
|
typename Filtered_kernel<R>::FK,
|
||||||
Sqrt_field_tag>
|
Field_with_sqrt_tag>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
CGAL_END_NAMESPACE
|
CGAL_END_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ typedef exact_ring_t ring_number_t;
|
||||||
typedef exact_field_t field_number_t;
|
typedef exact_field_t field_number_t;
|
||||||
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2.h>
|
#include <CGAL/Segment_Delaunay_graph_2.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
|
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
|
||||||
|
|
@ -40,7 +39,7 @@ struct K_ring : public CGAL::Simple_cartesian<ring_number_t> {};
|
||||||
struct K_field : public CGAL::Simple_cartesian<field_number_t> {};
|
struct K_field : public CGAL::Simple_cartesian<field_number_t> {};
|
||||||
|
|
||||||
typedef CGAL::Field_tag MTag;
|
typedef CGAL::Field_tag MTag;
|
||||||
typedef CGAL::Ring_tag MTag_wi;
|
typedef CGAL::Integral_domain_without_division_tag MTag_wi;
|
||||||
|
|
||||||
typedef CGAL::Segment_Delaunay_graph_traits_2<K_field,MTag> Gt;
|
typedef CGAL::Segment_Delaunay_graph_traits_2<K_field,MTag> Gt;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ typedef CGAL::Quotient<exact_ring_t> exact_field_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_2.h>
|
#include <CGAL/Segment_Delaunay_graph_2.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
|
#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
|
||||||
|
|
@ -26,9 +25,9 @@ typedef CGAL::Simple_cartesian<double> CK;
|
||||||
typedef CGAL::Simple_cartesian<exact_ring_t> EK_ring;
|
typedef CGAL::Simple_cartesian<exact_ring_t> EK_ring;
|
||||||
typedef CGAL::Simple_cartesian<exact_field_t> EK_field;
|
typedef CGAL::Simple_cartesian<exact_field_t> EK_field;
|
||||||
|
|
||||||
typedef CGAL::Sqrt_field_tag CK_MTag;
|
typedef CGAL::Field_with_sqrt_tag CK_MTag;
|
||||||
typedef CGAL::Field_tag EK_MTag;
|
typedef CGAL::Field_tag EK_MTag;
|
||||||
typedef CGAL::Ring_tag EK_MTag_wi;
|
typedef CGAL::Integral_domain_without_division_tag EK_MTag_wi;
|
||||||
|
|
||||||
typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<CK,CK_MTag,
|
typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<CK,CK_MTag,
|
||||||
EK_field,EK_MTag>
|
EK_field,EK_MTag>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ typedef exact_ring_t ring_number_t;
|
||||||
typedef exact_field_t field_number_t;
|
typedef exact_field_t field_number_t;
|
||||||
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_hierarchy_2.h>
|
#include <CGAL/Segment_Delaunay_graph_hierarchy_2.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
|
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
|
||||||
|
|
@ -40,7 +39,7 @@ struct K_ring : public CGAL::Simple_cartesian<ring_number_t> {};
|
||||||
struct K_field : public CGAL::Simple_cartesian<field_number_t> {};
|
struct K_field : public CGAL::Simple_cartesian<field_number_t> {};
|
||||||
|
|
||||||
typedef CGAL::Field_tag MTag;
|
typedef CGAL::Field_tag MTag;
|
||||||
typedef CGAL::Ring_tag MTag_wi;
|
typedef CGAL::Integral_domain_without_division_tag MTag_wi;
|
||||||
|
|
||||||
typedef CGAL::Segment_Delaunay_graph_traits_2<K_field,MTag> Gt;
|
typedef CGAL::Segment_Delaunay_graph_traits_2<K_field,MTag> Gt;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ typedef CGAL::Quotient<exact_ring_t> exact_field_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
|
|
||||||
#include <CGAL/Segment_Delaunay_graph_hierarchy_2.h>
|
#include <CGAL/Segment_Delaunay_graph_hierarchy_2.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
|
#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
|
||||||
|
|
@ -26,9 +25,9 @@ typedef CGAL::Simple_cartesian<double> CK;
|
||||||
typedef CGAL::Simple_cartesian<exact_ring_t> EK_ring;
|
typedef CGAL::Simple_cartesian<exact_ring_t> EK_ring;
|
||||||
typedef CGAL::Simple_cartesian<exact_field_t> EK_field;
|
typedef CGAL::Simple_cartesian<exact_field_t> EK_field;
|
||||||
|
|
||||||
typedef CGAL::Sqrt_field_tag CK_MTag;
|
typedef CGAL::Field_with_sqrt_tag CK_MTag;
|
||||||
typedef CGAL::Field_tag EK_MTag;
|
typedef CGAL::Field_tag EK_MTag;
|
||||||
typedef CGAL::Ring_tag EK_MTag_wi;
|
typedef CGAL::Integral_domain_without_division_tag EK_MTag_wi;
|
||||||
|
|
||||||
typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<CK,CK_MTag,
|
typedef CGAL::Segment_Delaunay_graph_filtered_traits_2<CK,CK_MTag,
|
||||||
EK_field,EK_MTag>
|
EK_field,EK_MTag>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// choose the kernel
|
// choose the kernel
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
|
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
|
||||||
#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
|
#include <CGAL/Segment_Delaunay_graph_filtered_traits_2.h>
|
||||||
#include <CGAL/Number_type_traits.h>
|
|
||||||
|
|
||||||
#ifdef CGAL_USE_CORE
|
#ifdef CGAL_USE_CORE
|
||||||
#include <CGAL/CORE_Expr.h>
|
#include <CGAL/CORE_Expr.h>
|
||||||
|
|
@ -32,9 +31,9 @@ typedef CGAL::Simple_cartesian<CGAL::Gmpq> Gmpq_Kernel;
|
||||||
typedef CGAL::Simple_cartesian<CGAL::Gmpz> Gmpz_Kernel;
|
typedef CGAL::Simple_cartesian<CGAL::Gmpz> Gmpz_Kernel;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef CGAL::Ring_tag Ring;
|
typedef CGAL::Integral_domain_without_division_tag Ring;
|
||||||
typedef CGAL::Field_tag Field;
|
typedef CGAL::Field_tag Field;
|
||||||
typedef CGAL::Sqrt_field_tag Sqrt;
|
typedef CGAL::Field_with_sqrt_tag Sqrt;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue