diff --git a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h new file mode 100644 index 00000000000..ea56d92bce7 --- /dev/null +++ b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h @@ -0,0 +1,154 @@ +// ============================================================================ +// +// Copyright (c) 1999 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------------- +// +// release : +// release_date : +// +// file : include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_ftC2.h +// revision : $Revision$ +// revision_date : +// author(s) : Sylvain.Pion@sophia.inria.fr +// Mariette Yvinec +// +// coordinator : Mariette Yvinec +// +// ============================================================================ + +#ifndef CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H +#define CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H + +// This file is automatically generated by the script for filtering +// predicates, using Interval arithmetic. + +// This file contains the low level cartesian predicates +// used by the 2D regular triangulation. + +CGAL_BEGIN_NAMESPACE + +#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION +template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE > +#endif +Oriented_side +power_testC2( + const CGAL::Filtered_exact &px, + const CGAL::Filtered_exact &py, + const CGAL::Filtered_exact &pwt, + + const CGAL::Filtered_exact &qx, + const CGAL::Filtered_exact &qy, + const CGAL::Filtered_exact &qwt, + + const CGAL::Filtered_exact &rx, + const CGAL::Filtered_exact &ry, + const CGAL::Filtered_exact &rwt, + + const CGAL::Filtered_exact &tx, + const CGAL::Filtered_exact &ty, + const CGAL::Filtered_exact &twt) +{ + FPU_CW_t backup = FPU_get_cw(); + FPU_set_cw(FPU_cw_up); + try + { + Oriented_side result = power_testC2( + px.interval(), + py.interval(), + pwt.interval(), + qx.interval(), + qy.interval(), + qwt.interval(), + rx.interval(), + ry.interval(), + rwt.interval(), + tx.interval(), + ty.interval(), + twt.interval()); + FPU_set_cw(backup); + return result; + } + catch (Interval_nt_advanced::unsafe_comparison) + { + FPU_set_cw(backup); + return power_testC2( + px.exact(), + py.exact(), + pwt.exact(), + qx.exact(), + qy.exact(), + qwt.exact(), + rx.exact(), + ry.exact(), + rwt.exact(), + tx.exact(), + ty.exact(), + twt.exact()); + } +} + + +#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION +template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE > +#endif +Oriented_side +power_testC2( + const CGAL::Filtered_exact &px, + const CGAL::Filtered_exact &py, + const CGAL::Filtered_exact &pwt, + + const CGAL::Filtered_exact &qx, + const CGAL::Filtered_exact &qy, + const CGAL::Filtered_exact &qwt, + + const CGAL::Filtered_exact &tx, + const CGAL::Filtered_exact &ty, + const CGAL::Filtered_exact &twt) +{ + FPU_CW_t backup = FPU_get_cw(); + FPU_set_cw(FPU_cw_up); + try + { + Oriented_side result = power_testC2( + px.interval(), + py.interval(), + pwt.interval(), + qx.interval(), + qy.interval(), + qwt.interval(), + tx.interval(), + ty.interval(), + twt.interval()); + FPU_set_cw(backup); + return result; + } + catch (Interval_nt_advanced::unsafe_comparison) + { + FPU_set_cw(backup); + return power_testC2( + px.exact(), + py.exact(), + pwt.exact(), + qx.exact(), + qy.exact(), + qwt.exact(), + tx.exact(), + ty.exact(), + twt.exact()); + } +} + +CGAL_END_NAMESPACE + +#ifdef CGAL_ARITHMETIC_FILTER_H +#ifndef CGAL_ARITHMETIC_FILTER_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H +#include +#endif // CGAL_ARITHMETIC_FILTER_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H +#endif + +#endif // CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_FTC2_H diff --git a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h new file mode 100644 index 00000000000..c25f3464f51 --- /dev/null +++ b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h @@ -0,0 +1,175 @@ +// ============================================================================ +// +// Copyright (c) 1999 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------------- +// +// release : +// release_date : +// +// file : include/CGAL/Arithmetic_filter/predicates/Regular_triangulation_rtH2.h +// revision : $Revision$ +// revision_date : +// author(s) : Sylvain.Pion@sophia.inria.fr +// Mariette Yvinec +// +// coordinator : Mariette Yvinec +// +// ============================================================================ + +#ifndef CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H +#define CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H + +// This file is automatically generated by the script for filtering +// predicates, using Interval arithmetic. + +// This file contains the low level homogeneous predicates +// used by the 2D regular triangulation. + +CGAL_BEGIN_NAMESPACE + +#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION +template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE > +#endif +Oriented_side +power_testH2( + const CGAL::Filtered_exact &px, + const CGAL::Filtered_exact &py, + const CGAL::Filtered_exact &pw, + const CGAL::Filtered_exact &pwt, + + const CGAL::Filtered_exact &qx, + const CGAL::Filtered_exact &qy, + const CGAL::Filtered_exact &qw, + const CGAL::Filtered_exact &qwt, + + const CGAL::Filtered_exact &rx, + const CGAL::Filtered_exact &ry, + const CGAL::Filtered_exact &rw, + const CGAL::Filtered_exact &rwt, + + const CGAL::Filtered_exact &tx, + const CGAL::Filtered_exact &ty, + const CGAL::Filtered_exact &tw, + const CGAL::Filtered_exact &twt) +{ + FPU_CW_t backup = FPU_get_cw(); + FPU_set_cw(FPU_cw_up); + try + { + Oriented_side result = power_testH2( + px.interval(), + py.interval(), + pw.interval(), + pwt.interval(), + qx.interval(), + qy.interval(), + qw.interval(), + qwt.interval(), + rx.interval(), + ry.interval(), + rw.interval(), + rwt.interval(), + tx.interval(), + ty.interval(), + tw.interval(), + twt.interval()); + FPU_set_cw(backup); + return result; + } + catch (Interval_nt_advanced::unsafe_comparison) + { + FPU_set_cw(backup); + return power_testH2( + px.exact(), + py.exact(), + pw.exact(), + pwt.exact(), + qx.exact(), + qy.exact(), + qw.exact(), + qwt.exact(), + rx.exact(), + ry.exact(), + rw.exact(), + rwt.exact(), + tx.exact(), + ty.exact(), + tw.exact(), + twt.exact()); + } +} + + +#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION +template < class CGAL_IA_CT, class CGAL_IA_ET, class CGAL_IA_CACHE > +#endif +Oriented_side +power_testH2( + const CGAL::Filtered_exact &px, + const CGAL::Filtered_exact &py, + const CGAL::Filtered_exact &pw, + const CGAL::Filtered_exact &pwt, + + const CGAL::Filtered_exact &qx, + const CGAL::Filtered_exact &qy, + const CGAL::Filtered_exact &qw, + const CGAL::Filtered_exact &qwt, + + const CGAL::Filtered_exact &tx, + const CGAL::Filtered_exact &ty, + const CGAL::Filtered_exact &tw, + const CGAL::Filtered_exact &twt) +{ + FPU_CW_t backup = FPU_get_cw(); + FPU_set_cw(FPU_cw_up); + try + { + Oriented_side result = power_testH2( + px.interval(), + py.interval(), + pw.interval(), + pwt.interval(), + qx.interval(), + qy.interval(), + qw.interval(), + qwt.interval(), + tx.interval(), + ty.interval(), + tw.interval(), + twt.interval()); + FPU_set_cw(backup); + return result; + } + catch (Interval_nt_advanced::unsafe_comparison) + { + FPU_set_cw(backup); + return power_testH2( + px.exact(), + py.exact(), + pw.exact(), + pwt.exact(), + qx.exact(), + qy.exact(), + qw.exact(), + qwt.exact(), + tx.exact(), + ty.exact(), + tw.exact(), + twt.exact()); + } +} + +CGAL_END_NAMESPACE + +#ifdef CGAL_ARITHMETIC_FILTER_H +#ifndef CGAL_ARITHMETIC_FILTER_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H +#include +#endif // CGAL_ARITHMETIC_FILTER_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H +#endif + +#endif // CGAL_ARITHMETIC_FILTER_REGULAR_TRIANGULATION_RTH2_H