From b740e90de0035668c1eaeb7e707478554f375800 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Wed, 9 Apr 2008 12:20:25 +0000 Subject: [PATCH] Rename the following functions: sign_of_determinant2x2 sign_of_determinant3x3 sign_of_determinant4x4 sign_of_determinant5x5 sign_of_determinant6x6 to: sign_of_determinant So that we have less dimension-dependent namings, at least internally... --- .../Infinite_edge_test_C2.h | 16 ++++----- .../new_traits/Conflict_2.h | 12 +++---- .../CGAL/Cartesian/Aff_transformation_rep_2.h | 2 +- .../CGAL/Cartesian/Aff_transformation_rep_3.h | 2 +- .../include/CGAL/predicates/kernel_ftC2.h | 36 +++++++++---------- .../include/CGAL/predicates/kernel_ftC3.h | 34 +++++++++--------- .../CGAL/Homogeneous/function_objects.h | 24 ++++++------- ...s_for_voronoi_intersection_cartesian_2_3.h | 2 +- ...s_for_voronoi_intersection_cartesian_2_3.h | 12 +++---- .../include/CGAL/Monge_via_jet_fitting.h | 2 +- .../CGAL/predicates/sign_of_determinant.h | 10 +++--- .../include/CGAL/_test_fct_determinant.h | 16 ++++----- .../Finite_edge_interior_conflict_C2.h | 2 +- .../Infinite_edge_interior_conflict_C2.h | 4 +-- .../Vertex_conflict_C2.h | 6 ++-- .../predicates/Regular_triangulation_ftC2.h | 6 ++-- .../predicates/Regular_triangulation_rtH2.h | 4 +-- .../predicates/Regular_triangulation_ftC3.h | 20 +++++------ .../predicates/Regular_triangulation_rtH3.h | 2 +- 19 files changed, 106 insertions(+), 106 deletions(-) diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h index b36b1a17f81..b7e24c96dc6 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Infinite_edge_test_C2.h @@ -64,23 +64,23 @@ public: Orientation o = chi2(l1, l2, tag); - //sign_of_determinant2x2(a1, b1, a2, b2); + //sign_of_determinant(a1, b1, a2, b2); if ( o == COLLINEAR ) { Bitangent_line l2_rot = l2.get_rot90(); Sign dot = chi2(l1, l2_rot, tag); - //sign_of_determinant2x2(a1, b1, -b2, a2); + //sign_of_determinant(a1, b1, -b2, a2); CGAL_assertion( dot != ZERO ); Orientation o1 = chi2(l1, l3, tag); - //sign_of_determinant2x2(a1, b1, a3, b3); + //sign_of_determinant(a1, b1, a3, b3); if ( dot == POSITIVE ) { if ( o1 != COLLINEAR ) { return ON_UNBOUNDED_SIDE; } Bitangent_line l3_rot = l3.get_rot90(); Sign dot1 = chi2(l1, l3_rot, tag); - //sign_of_determinant2x2(a1, b1, -b3, a3); + //sign_of_determinant(a1, b1, -b3, a3); CGAL_assertion( dot1 != ZERO ); return ( dot1 == POSITIVE ) ? ON_BOUNDARY : ON_UNBOUNDED_SIDE; @@ -90,9 +90,9 @@ public: return ( o1 == COLLINEAR ) ? ON_BOUNDARY : ON_UNBOUNDED_SIDE; } else if ( o == LEFT_TURN ) { Orientation o1 = chi2(l1, l3, tag); - //sign_of_determinant2x2(a1, b1, a3, b3); + //sign_of_determinant(a1, b1, a3, b3); Orientation o2 = chi2(l2, l3, tag); - //sign_of_determinant2x2(a2, b2, a3, b3); + //sign_of_determinant(a2, b2, a3, b3); // std::cout << "orientation(l1, l3): " << int(o1) << std::endl; // std::cout << "orientation(l2, l3): " << int(o2) << std::endl; @@ -107,9 +107,9 @@ public: return ON_UNBOUNDED_SIDE; } Orientation o1 = chi2(l1, l3, tag); - //sign_of_determinant2x2(a1, b1, a3, b3); + //sign_of_determinant(a1, b1, a3, b3); Orientation o2 = chi2(l2, l3, tag); - //sign_of_determinant2x2(a2, b2, a3, b3); + //sign_of_determinant(a2, b2, a3, b3); // std::cout << "orientation(l1, l3): " << int(o1) << std::endl; // std::cout << "orientation(l2, l3): " << int(o2) << std::endl; diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/new_traits/Conflict_2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/new_traits/Conflict_2.h index f5961f746be..2ed8a8e481c 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/new_traits/Conflict_2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/new_traits/Conflict_2.h @@ -48,7 +48,7 @@ protected: const Inverted_weighted_point &p2, const Inverted_weighted_point &p3) const { - return sign_of_determinant3x3( p1.p(), p2.p(), p3.p(), + return sign_of_determinant( p1.p(), p2.p(), p3.p(), p1.x(), p2.x(), p3.x(), p1.y(), p2.y(), p3.y() ); } @@ -119,15 +119,15 @@ protected: CGAL_assertion(i == -1 || i == 1 || i == 2 || i == 3); Sign s; - Sign s_xTest = sign_of_determinant2x2(p2.p(), p2.x(), p1.p(), p1.x()); + Sign s_xTest = sign_of_determinant(p2.p(), p2.x(), p1.p(), p1.x()); if ( s_xTest != ZERO ) { s = s_xTest * - sign_of_determinant3x3( p1.p(), p1.x(), p1.weight(), + sign_of_determinant( p1.p(), p1.x(), p1.weight(), p2.p(), p2.x(), p2.weight(), p3.p(), p3.x(), p3.weight() ); } else { s = sign_determinant2x2( p2.p(), p2.y(), p1.p(), p1.y() ) * - sign_of_determinant3x3( p1.p(), p1.y(), p1.weight(), + sign_of_determinant( p1.p(), p1.y(), p1.weight(), p2.p(), p2.y(), p2.weight(), p3.p(), p3.y(), p3.weight() ); } @@ -165,9 +165,9 @@ protected: Sign ordered_on_line_test(const Inverted_weighted_point &p1, const Inverted_weighted_point &p2) const { - Sign s_det = sign_of_determinant2x2( p1.p(), p1.x(), p2.p(), p2.x() ); + Sign s_det = sign_of_determinant( p1.p(), p1.x(), p2.p(), p2.x() ); if ( s_det != ZERO ) { return s_det; } - return sign_of_determinant2x2( p1.p(), p1.y(), p2.p(), p2.y() ); + return sign_of_determinant( p1.p(), p1.y(), p2.p(), p2.y() ); } bool ordered_on_line(const Inverted_weighted_point &p1, diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h index 63863e19104..3666f3a4f5b 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h @@ -130,7 +130,7 @@ friend class Scaling_repC2; bool is_even() const { - return sign_of_determinant2x2(t11, t12, t21, t22) == POSITIVE; + return sign_of_determinant(t11, t12, t21, t22) == POSITIVE; } FT cartesian(int i, int j) const diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h index 7d5a2ff5639..8935d0fee63 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h @@ -145,7 +145,7 @@ public: virtual bool is_even() const { - return sign_of_determinant3x3(t11, t12, t13, + return sign_of_determinant(t11, t12, t13, t21, t22, t23, t31, t32, t33) == POSITIVE; } diff --git a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h index eae01beefcc..3cd812a102a 100644 --- a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h +++ b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h @@ -37,7 +37,7 @@ typename Equal_to::result_type parallelC2(const FT &l1a, const FT &l1b, const FT &l2a, const FT &l2b) { - return sign_of_determinant2x2(l1a, l1b, l2a, l2b) == ZERO; + return sign_of_determinant(l1a, l1b, l2a, l2b) == ZERO; } template < class FT > @@ -47,7 +47,7 @@ parallelC2(const FT &s1sx, const FT &s1sy, const FT &s2sx, const FT &s2sy, const FT &s2tx, const FT &s2ty) { - return sign_of_determinant2x2(s1tx - s1sx, s1ty - s1sy, + return sign_of_determinant(s1tx - s1sx, s1ty - s1sy, s2tx - s2sx, s2ty - s2sy) == ZERO; } @@ -57,14 +57,14 @@ typename Equal_to::result_type equal_lineC2(const FT &l1a, const FT &l1b, const FT &l1c, const FT &l2a, const FT &l2b, const FT &l2c) { - if (sign_of_determinant2x2(l1a, l1b, l2a, l2b) != ZERO) + if (sign_of_determinant(l1a, l1b, l2a, l2b) != ZERO) return false; // Not parallel. typename Sgn::result_type s1a = CGAL_NTS sign(l1a); if (s1a != ZERO) return s1a == CGAL_NTS sign(l2a) - && sign_of_determinant2x2(l1a, l1c, l2a, l2c) == ZERO; + && sign_of_determinant(l1a, l1c, l2a, l2c) == ZERO; return CGAL_NTS sign(l1b) == CGAL_NTS sign(l2b) - && sign_of_determinant2x2(l1b, l1c, l2b, l2c) == ZERO; + && sign_of_determinant(l1b, l1c, l2b, l2c) == ZERO; } template < class FT > @@ -96,7 +96,7 @@ compare_xC2(const FT &la, const FT &lb, const FT &lc, FT den2 = det2x2_by_formula( la, lb, h2a, h2b); Sign s = Sign (CGAL_NTS sign(den1) * CGAL_NTS sign(den2)); CGAL_kernel_assertion( s != ZERO ); - return Comparison_result( s * sign_of_determinant2x2(num1, + return Comparison_result( s * sign_of_determinant(num1, num2, den1, den2)); */ FT num1 = det2x2_by_formula( la, lc, h1a, h1c); @@ -125,7 +125,7 @@ compare_xC2(const FT &l1a, const FT &l1b, const FT &l1c, FT den2 = det2x2_by_formula( l2a, l2b, h2a, h2b); typename Sgn::result_type s = CGAL_NTS sign(den1) * CGAL_NTS sign(den2); CGAL_kernel_assertion( s != ZERO ); - return s * sign_of_determinant2x2(num1, num2, den1, den2); + return s * sign_of_determinant(num1, num2, den1, den2); } template < class FT > @@ -148,7 +148,7 @@ compare_y_at_xC2(const FT &px, { typename Sgn::result_type s = CGAL_NTS sign(l1b) * CGAL_NTS sign(l2b); CGAL_kernel_assertion( s != ZERO ); - return s * sign_of_determinant2x2(l2a*px+l2c, l2b, + return s * sign_of_determinant(l2a*px+l2c, l2b, l1a*px+l1c, l1b); } @@ -160,9 +160,9 @@ compare_y_at_xC2(const FT &l1a, const FT &l1b, const FT &l1c, const FT &ha, const FT &hb, const FT &hc) { typename Sgn::result_type s = CGAL_NTS sign(hb) * - sign_of_determinant2x2(l1a, l1b, l2a, l2b); + sign_of_determinant(l1a, l1b, l2a, l2b); CGAL_kernel_assertion( s != ZERO ); - return s * sign_of_determinant3x3(l1a, l1b, l1c, + return s * sign_of_determinant(l1a, l1b, l1c, l2a, l2b, l2c, ha, hb, hc); } @@ -182,7 +182,7 @@ compare_y_at_xC2(const FT &l1a, const FT &l1b, const FT &l1c, CGAL_NTS sign(h2b) * CGAL_NTS sign(den); CGAL_kernel_assertion( s != ZERO ); - return s * sign_of_determinant2x2(h2a*num+h2c*den, h2b, + return s * sign_of_determinant(h2a*num+h2c*den, h2b, h1a*num+h1c*den, h1b); } @@ -266,7 +266,7 @@ equal_directionC2(const FT &dx1, const FT &dy1, { return CGAL_NTS sign(dx1) == CGAL_NTS sign(dx2) && CGAL_NTS sign(dy1) == CGAL_NTS sign(dy2) - && sign_of_determinant2x2(dx1, dy1, dx2, dy2) == ZERO; + && sign_of_determinant(dx1, dy1, dx2, dy2) == ZERO; } template < class FT > @@ -287,7 +287,7 @@ compare_angle_with_x_axisC2(const FT &dx1, const FT &dy1, return LARGER; else if (quadrant_1 < quadrant_2) return SMALLER; - return -sign_of_determinant2x2(dx1,dy1,dx2,dy2); + return -sign_of_determinant(dx1,dy1,dx2,dy2); } template < class FT > @@ -401,7 +401,7 @@ orientationC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { - return sign_of_determinant2x2(qx-px, qy-py, rx-px, ry-py); + return sign_of_determinant(qx-px, qy-py, rx-px, ry-py); } template < class FT > @@ -409,7 +409,7 @@ inline typename Same_uncertainty_nt::type orientationC2(const FT &ux, const FT &uy, const FT &vx, const FT &vy) { - return sign_of_determinant2x2(ux, uy, vx, vy); + return sign_of_determinant(ux, uy, vx, vy); } template < class FT > @@ -459,7 +459,7 @@ side_of_oriented_circleC2(const FT &px, const FT &py, const FT &tx, const FT &ty) { // Oriented_side( - // sign_of_determinant4x4(px, py, px*px + py*py, 1, + // sign_of_determinant(px, py, px*px + py*py, 1, // qx, qy, qx*qx + qy*qy, 1, // rx, ry, rx*rx + ry*ry, 1, // tx, ty, tx*tx + ty*ty, 1)); @@ -471,10 +471,10 @@ side_of_oriented_circleC2(const FT &px, const FT &py, FT tpx = tx-px; FT tpy = ty-py; // The usual 3x3 formula can be simplified a little bit to a 2x2. -// - sign_of_determinant3x3(qpx, qpy, square(qpx) + square(qpy), +// - sign_of_determinant(qpx, qpy, square(qpx) + square(qpy), // rpx, rpy, square(rpx) + square(rpy), // tpx, tpy, square(tpx) + square(tpy))); - return sign_of_determinant2x2( qpx*tpy - qpy*tpx, tpx*(tx-qx) + tpy*(ty-qy), + return sign_of_determinant( qpx*tpy - qpy*tpx, tpx*(tx-qx) + tpy*(ty-qy), qpx*rpy - qpy*rpx, rpx*(rx-qx) + rpy*(ry-qy)); } diff --git a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h index 312b26d1d6f..ae75cda7096 100644 --- a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h @@ -36,9 +36,9 @@ typename Equal_to::result_type parallelC3(const FT &v1x, const FT &v1y, const FT &v1z, const FT &v2x, const FT &v2y, const FT &v2z) { - return sign_of_determinant2x2(v1x, v2x, v1y, v2y) == ZERO - && sign_of_determinant2x2(v1x, v2x, v1z, v2z) == ZERO - && sign_of_determinant2x2(v1y, v2y, v1z, v2z) == ZERO; + return sign_of_determinant(v1x, v2x, v1y, v2y) == ZERO + && sign_of_determinant(v1x, v2x, v1z, v2z) == ZERO + && sign_of_determinant(v1y, v2y, v1z, v2z) == ZERO; } template < class FT > @@ -106,12 +106,12 @@ collinearC3(const FT &px, const FT &py, const FT &pz, FT dqx = qx-rx; FT dpy = py-ry; FT dqy = qy-ry; - if (sign_of_determinant2x2(dpx, dqx, dpy, dqy) != ZERO) + if (sign_of_determinant(dpx, dqx, dpy, dqy) != ZERO) return false; FT dpz = pz-rz; FT dqz = qz-rz; - return sign_of_determinant2x2(dpx, dqx, dpz, dqz) == ZERO - && sign_of_determinant2x2(dpy, dqy, dpz, dqz) == ZERO; + return sign_of_determinant(dpx, dqx, dpz, dqz) == ZERO + && sign_of_determinant(dpy, dqy, dpz, dqz) == ZERO; } template < class FT > @@ -122,7 +122,7 @@ orientationC3(const FT &px, const FT &py, const FT &pz, const FT &rx, const FT &ry, const FT &rz, const FT &sx, const FT &sy, const FT &sz) { - return sign_of_determinant3x3(qx-px,rx-px,sx-px, + return sign_of_determinant(qx-px,rx-px,sx-px, qy-py,ry-py,sy-py, qz-pz,rz-pz,sz-pz); } @@ -134,7 +134,7 @@ orientationC3(const FT &ux, const FT &uy, const FT &uz, const FT &vx, const FT &vy, const FT &vz, const FT &wx, const FT &wy, const FT &wz) { - return sign_of_determinant3x3(ux, vx, wx, + return sign_of_determinant(ux, vx, wx, uy, vy, wy, uz, vz, wz); } @@ -226,7 +226,7 @@ coplanar_side_of_bounded_circleC3(const FT &px, const FT &py, const FT &pz, FT vy = pqz*prx - pqx*prz; FT vz = pqx*pry - pqy*prx; FT v2 = CGAL_NTS square(vx) + CGAL_NTS square(vy) + CGAL_NTS square(vz); - return enum_cast(sign_of_determinant4x4(ptx,pty,ptz,pt2, + return enum_cast(sign_of_determinant(ptx,pty,ptz,pt2, rtx,rty,rtz,rt2, qtx,qty,qtz,qt2, vx,vy,vz,v2)); @@ -272,9 +272,9 @@ typename Equal_to::result_type equal_directionC3(const FT &dx1, const FT &dy1, const FT &dz1, const FT &dx2, const FT &dy2, const FT &dz2) { - return sign_of_determinant2x2(dx1, dy1, dx2, dy2) == ZERO - && sign_of_determinant2x2(dx1, dz1, dx2, dz2) == ZERO - && sign_of_determinant2x2(dy1, dz1, dy2, dz2) == ZERO + return sign_of_determinant(dx1, dy1, dx2, dy2) == ZERO + && sign_of_determinant(dx1, dz1, dx2, dz2) == ZERO + && sign_of_determinant(dy1, dz1, dy2, dz2) == ZERO && CGAL_NTS sign(dx1) == CGAL_NTS sign(dx2) && CGAL_NTS sign(dy1) == CGAL_NTS sign(dy2) && CGAL_NTS sign(dz1) == CGAL_NTS sign(dz2); @@ -294,13 +294,13 @@ equal_planeC3(const FT &ha, const FT &hb, const FT &hc, const FT &hd, Sg s1a = CGAL_NTS sign(ha); if (s1a != ZERO) return s1a == CGAL_NTS sign(pa) - && sign_of_determinant2x2(pa, pd, ha, hd) == ZERO; + && sign_of_determinant(pa, pd, ha, hd) == ZERO; Sg s1b = CGAL_NTS sign(hb); if (s1b != ZERO) return s1b == CGAL_NTS sign(pb) - && sign_of_determinant2x2(pb, pd, hb, hd) == ZERO; + && sign_of_determinant(pb, pd, hb, hd) == ZERO; return CGAL_NTS sign(pc) == CGAL_NTS sign(hc) - && sign_of_determinant2x2(pc, pd, hc, hd) == ZERO; + && sign_of_determinant(pc, pd, hc, hd) == ZERO; } template @@ -337,7 +337,7 @@ side_of_oriented_sphereC3(const FT &px, const FT &py, const FT &pz, FT sty = sy - ty; FT stz = sz - tz; FT st2 = CGAL_NTS square(stx) + CGAL_NTS square(sty) + CGAL_NTS square(stz); - return sign_of_determinant4x4(ptx,pty,ptz,pt2, + return sign_of_determinant(ptx,pty,ptz,pt2, rtx,rty,rtz,rt2, qtx,qty,qtz,qt2, stx,sty,stz,st2); @@ -498,7 +498,7 @@ cmp_signed_dist_to_planeC3( const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { - return sign_of_determinant3x3( pqx-ppx, pqy-ppy, pqz-ppz, + return sign_of_determinant( pqx-ppx, pqy-ppy, pqz-ppz, prx-ppx, pry-ppy, prz-ppz, px-qx, py-qy, pz-qz); } diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 6d0f8ad8aaf..1f97bd3dfe9 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -3649,19 +3649,19 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { - Orientation oxy_pqr = sign_of_determinant3x3(p.hx(), p.hy(), p.hw(), + Orientation oxy_pqr = sign_of_determinant(p.hx(), p.hy(), p.hw(), q.hx(), q.hy(), q.hw(), r.hx(), r.hy(), r.hw()); if (oxy_pqr != COLLINEAR) return oxy_pqr; - Orientation oyz_pqr = sign_of_determinant3x3(p.hy(), p.hz(), p.hw(), + Orientation oyz_pqr = sign_of_determinant(p.hy(), p.hz(), p.hw(), q.hy(), q.hz(), q.hw(), r.hy(), r.hz(), r.hw()); if (oyz_pqr != COLLINEAR) return oyz_pqr; - return sign_of_determinant3x3(p.hx(), p.hz(), p.hw(), + return sign_of_determinant(p.hx(), p.hz(), p.hw(), q.hx(), q.hz(), q.hw(), r.hx(), r.hz(), r.hw()); } @@ -3682,24 +3682,24 @@ namespace HomogeneousKernelFunctors { // compute orientation of p,q,s in this plane P: Orientation save; - if ( (save = sign_of_determinant3x3(p.hy(), p.hz(), p.hw(), + if ( (save = sign_of_determinant(p.hy(), p.hz(), p.hw(), q.hy(), q.hz(), q.hw(), r.hy(), r.hz(), r.hw())) != COLLINEAR) - { return save * sign_of_determinant3x3(p.hy(), p.hz(), p.hw(), + { return save * sign_of_determinant(p.hy(), p.hz(), p.hw(), q.hy(), q.hz(), q.hw(), s.hy(), s.hz(), s.hw()); } - if ( (save = sign_of_determinant3x3(p.hx(), p.hz(), p.hw(), + if ( (save = sign_of_determinant(p.hx(), p.hz(), p.hw(), q.hx(), q.hz(), q.hw(), r.hx(), r.hz(), r.hw())) != COLLINEAR) - { return save * sign_of_determinant3x3(p.hx(), p.hz(), p.hw(), + { return save * sign_of_determinant(p.hx(), p.hz(), p.hw(), q.hx(), q.hz(), q.hw(), s.hx(), s.hz(), s.hw()); } - if ( (save = sign_of_determinant3x3(p.hx(), p.hy(), p.hw(), + if ( (save = sign_of_determinant(p.hx(), p.hy(), p.hw(), q.hx(), q.hy(), q.hw(), r.hx(), r.hy(), r.hw())) != COLLINEAR) - { return save * sign_of_determinant3x3( p.hx(), p.hy(), p.hw(), + { return save * sign_of_determinant( p.hx(), p.hy(), p.hw(), q.hx(), q.hy(), q.hw(), s.hx(), s.hy(), s.hw()); } @@ -4285,7 +4285,7 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Vector_2& u, const Vector_2& v) const { - return sign_of_determinant2x2(u.hx(), u.hy(), + return sign_of_determinant(u.hx(), u.hy(), v.hx(), v.hy()); } @@ -4312,7 +4312,7 @@ namespace HomogeneousKernelFunctors { const Point_3& r, const Point_3& s) const { // Two rows are switched, because of the homogeneous column. - return sign_of_determinant4x4( p.hx(), p.hy(), p.hz(), p.hw(), + return sign_of_determinant( p.hx(), p.hy(), p.hz(), p.hw(), r.hx(), r.hy(), r.hz(), r.hw(), q.hx(), q.hy(), q.hz(), q.hw(), s.hx(), s.hy(), s.hz(), s.hw()); @@ -4321,7 +4321,7 @@ namespace HomogeneousKernelFunctors { result_type operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w) const { - return sign_of_determinant3x3( u.hx(), u.hy(), u.hz(), + return sign_of_determinant( u.hx(), u.hy(), u.hz(), v.hx(), v.hy(), v.hz(), w.hx(), w.hy(), w.hz()); } diff --git a/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h b/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h index 587d8f68805..acf9e876b47 100644 --- a/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h +++ b/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h @@ -128,7 +128,7 @@ bisector_plane_intersection_translateC3(const RT &ax, const RT &ay, // if p is on the positive side of the plane //(<=> (p-a)*n >0 <=> na < 0) then orientation (pq p1 p2) is ccw // if not: permutation of p1 and p2 - if((sign_of_determinant3x3(qx,qy,qz, x1,y1,RT(0),x2 ,y2,RT(1)) + if((sign_of_determinant(qx,qy,qz, x1,y1,RT(0),x2 ,y2,RT(1)) * CGAL_NTS sign (-na)) > 0 ) { RT x3(x1),y3(y1); diff --git a/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h b/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h index a770589f7b2..8b04be1668c 100644 --- a/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h +++ b/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h @@ -37,13 +37,13 @@ side_of_plane_centered_sphere_translateC3( RT na =nx*ax + ny*ay + nz*az; na *= RT(2.0); - Sign num = sign_of_determinant4x4(rx, ry, rz, r2, + Sign num = sign_of_determinant(rx, ry, rz, r2, qx, qy, qz, q2, nx, ny, nz, na, tx, ty, tz, t2); //denumerator: - Sign den = sign_of_determinant3x3(nx,ny,nz, + Sign den = sign_of_determinant(nx,ny,nz, qx,qy,qz, rx,ry,rz); CGAL_assertion(den != ZERO); @@ -93,23 +93,23 @@ side_of_plane_centered_sphere_translateC3( RT na =nx*ax + ny*ay + nz*az; na *= RT(2.0); - Sign num = sign_of_determinant4x4(qx, qy, qz, q2, + Sign num = sign_of_determinant(qx, qy, qz, q2, ny, -nx, RT(0), RT(0), nx, ny, nz, na, rx, ry, rz, r2); //denumerator: - Sign den = sign_of_determinant3x3(nx,ny,nz, + Sign den = sign_of_determinant(nx,ny,nz, ny,-nx, RT(0), qx,qy,qz); if (den==ZERO) { // bad choice: (ny,-nx,0) is coplanar with n,q. // by precondition: q and n may not be collinear // => the cross product q*n is orthogonal to q, n and not coplanar - num = sign_of_determinant4x4(qx, qy, qz, q2, + num = sign_of_determinant(qx, qy, qz, q2, ny*qz-nz*qy, nz*qx-nx*qz,nx*qy-ny*qx, RT(0), nx, ny, nz, na, rx, ry, rz, r2); - den = sign_of_determinant3x3(nx,ny,nz, + den = sign_of_determinant(nx,ny,nz, ny*qz-nz*qy, nz*qx - nx*qz,nx*qy-ny*qx, qx,qy,qz); } diff --git a/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h b/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h index f8760119b44..eb910b00ff8 100644 --- a/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h +++ b/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h @@ -736,7 +736,7 @@ void Monge_via_jet_fitting:: switch_to_direct_orientation(Vector_3& v1, const Vector_3& v2, const Vector_3& v3) { - CGAL::Sign orientation = CGAL::sign_of_determinant3x3(v1[0], v2[0], v3[0], + CGAL::Sign orientation = CGAL::sign_of_determinant(v1[0], v2[0], v3[0], v1[1], v2[1], v3[1], v1[2], v2[2], v3[2]); if (orientation == CGAL::NEGATIVE) v1 = -v1; diff --git a/Kernel_23/include/CGAL/predicates/sign_of_determinant.h b/Kernel_23/include/CGAL/predicates/sign_of_determinant.h index f15af3c1195..f8ffdc71b79 100644 --- a/Kernel_23/include/CGAL/predicates/sign_of_determinant.h +++ b/Kernel_23/include/CGAL/predicates/sign_of_determinant.h @@ -32,7 +32,7 @@ CGAL_BEGIN_NAMESPACE template inline typename Sgn::result_type -sign_of_determinant2x2( const RT& a00, const RT& a01, +sign_of_determinant( const RT& a00, const RT& a01, const RT& a10, const RT& a11) { return enum_cast(CGAL_NTS compare( a00*a11, a10*a01)); @@ -41,7 +41,7 @@ sign_of_determinant2x2( const RT& a00, const RT& a01, template inline typename Sgn::result_type -sign_of_determinant3x3( const RT& a00, const RT& a01, const RT& a02, +sign_of_determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a10, const RT& a11, const RT& a12, const RT& a20, const RT& a21, const RT& a22) { @@ -53,7 +53,7 @@ sign_of_determinant3x3( const RT& a00, const RT& a01, const RT& a02, template inline typename Sgn::result_type -sign_of_determinant4x4( +sign_of_determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a20, const RT& a21, const RT& a22, const RT& a23, @@ -68,7 +68,7 @@ sign_of_determinant4x4( template CGAL_KERNEL_LARGE_INLINE typename Sgn::result_type -sign_of_determinant5x5( +sign_of_determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14, const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a24, @@ -85,7 +85,7 @@ sign_of_determinant5x5( template CGAL_KERNEL_LARGE_INLINE typename Sgn::result_type -sign_of_determinant6x6( +sign_of_determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04, const RT& a05, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14, diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_determinant.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_determinant.h index 4892333af80..4ae2cb9112c 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_determinant.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_determinant.h @@ -88,34 +88,34 @@ _test_fct_determinant(const NT&) // sign_of_determinantDxD - assert( CGAL::sign_of_determinant2x2( zero, one, \ + assert( CGAL::sign_of_determinant( zero, one, \ one, zero) == CGAL::NEGATIVE ); - assert( CGAL::sign_of_determinant2x2( one, one, \ + assert( CGAL::sign_of_determinant( one, one, \ zero, -one) == CGAL::NEGATIVE ); - assert( CGAL::sign_of_determinant2x2( one, one, \ + assert( CGAL::sign_of_determinant( one, one, \ zero, one) == CGAL::POSITIVE ); - assert( CGAL::sign_of_determinant2x2( zero, -one, \ + assert( CGAL::sign_of_determinant( zero, -one, \ zero, one) == CGAL::ZERO ); - assert( CGAL::sign_of_determinant4x4( one, zero, one, -one, \ + assert( CGAL::sign_of_determinant( one, zero, one, -one, \ zero, one, one, -one, \ zero, two, zero, one, \ zero, -one, zero, zero ) == \ - CGAL::sign_of_determinant3x3( one, one, -one, \ + CGAL::sign_of_determinant( one, one, -one, \ two, zero, one, \ -one, zero, zero ) ); - assert( CGAL::sign_of_determinant6x6( one, zero, zero, zero, zero, zero, \ + assert( CGAL::sign_of_determinant( one, zero, zero, zero, zero, zero, \ zero, one, zero, one, -one, zero, \ zero, zero, one, one, -one, zero, \ zero, one, two, zero, one, two, \ zero, one, one, zero, -one, zero, \ zero, -one, -one, zero, zero, one )==\ - CGAL::sign_of_determinant5x5( one, zero, one, -one, zero, \ + CGAL::sign_of_determinant( one, zero, one, -one, zero, \ zero, one, one, -one, zero, \ one, two, zero, one, two, \ one, one, zero, -one, zero, \ diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h index b7ebc7cda7c..39154d0fa1b 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Finite_edge_interior_conflict_C2.h @@ -688,7 +688,7 @@ public: RT dtqx = q.point().x() - t.point().x(); RT dtqy = q.point().y() - t.point().y(); - Sign s1 = sign_of_determinant2x2(dtpx, minus_dtpy, dtqy, dtqx); + Sign s1 = sign_of_determinant(dtpx, minus_dtpy, dtqy, dtqx); CGAL_assertion( s1 != ZERO ); return ( s1 == NEGATIVE ); diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h index 2a6a7eff375..556198baecf 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Infinite_edge_interior_conflict_C2.h @@ -72,7 +72,7 @@ public: RT dtqx = q.point().x() - t.point().x(); RT minus_dtqy = -q.point().y() + t.point().y(); - Sign sgn1 = sign_of_determinant2x2(dtsx, dtsy, minus_dtqy, dtqx); + Sign sgn1 = sign_of_determinant(dtsx, dtsy, minus_dtqy, dtqx); CGAL_assertion( sgn1 != ZERO ); @@ -96,7 +96,7 @@ public: RT dtqx = q.point().x() - t.point().x(); RT minus_dtqy = -q.point().y() + t.point().y(); - Sign sgn1 = sign_of_determinant2x2(dtssx, dtssy, minus_dtqy, dtqx); + Sign sgn1 = sign_of_determinant(dtssx, dtssy, minus_dtqy, dtqx); CGAL_assertion( sgn1 != ZERO ); diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h index b148a42c136..97a4f746ac5 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Vertex_conflict_C2.h @@ -127,7 +127,7 @@ private: RT dtqx = qp.x() - tp.x(); RT minus_dtqy = -qp.y() + tp.y(); - Sign s = sign_of_determinant2x2(dtpx, dtpy, minus_dtqy, dtqx); + Sign s = sign_of_determinant(dtpx, dtpy, minus_dtqy, dtqx); CGAL_assertion( s != ZERO ); @@ -210,7 +210,7 @@ private: RT dtqx = qp.x() - tp.x(); RT minus_dtqy = -qp.y() + tp.y(); - Sign s = sign_of_determinant2x2(dtpx, dtpy, minus_dtqy, dtqx); + Sign s = sign_of_determinant(dtpx, dtpy, minus_dtqy, dtqx); CGAL_assertion( s != ZERO ); @@ -302,7 +302,7 @@ private: RT dtqx = qp.x() - tp.x(); RT minus_dtqy = -qp.y() + tp.y(); - Sign s = sign_of_determinant2x2(dtpx, dtpy, minus_dtqy, dtqx); + Sign s = sign_of_determinant(dtpx, dtpy, minus_dtqy, dtqx); CGAL_assertion( s != ZERO ); diff --git a/Triangulation_2/include/CGAL/predicates/Regular_triangulation_ftC2.h b/Triangulation_2/include/CGAL/predicates/Regular_triangulation_ftC2.h index a0239ed7b55..ff89dbb9384 100644 --- a/Triangulation_2/include/CGAL/predicates/Regular_triangulation_ftC2.h +++ b/Triangulation_2/include/CGAL/predicates/Regular_triangulation_ftC2.h @@ -59,7 +59,7 @@ power_testC2( const FT &px, const FT &py, const FT &pwt, FT dry = ry - ty; FT drz = CGAL_NTS square(drx) + CGAL_NTS square(dry) - rwt + twt; - return sign_of_determinant3x3(dpx, dpy, dpz, + return sign_of_determinant(dpx, dpy, dpz, dqx, dqy, dqz, drx, dry, drz); } @@ -82,11 +82,11 @@ power_testC2( const FT &px, const FT &py, const FT &pwt, // We do an orthogonal projection on the (x) axis, if possible. Comparison_result cmpx = CGAL_NTS compare(px, qx); if (cmpx != EQUAL) - return cmpx * sign_of_determinant2x2(dpx, dpz, dqx, dqz); + return cmpx * sign_of_determinant(dpx, dpz, dqx, dqz); // If not possible, then on the (y) axis. Comparison_result cmpy = CGAL_NTS compare(py, qy); - return cmpy * sign_of_determinant2x2(dpy, dpz, dqy, dqz); + return cmpy * sign_of_determinant(dpy, dpz, dqy, dqz); } CGAL_END_NAMESPACE diff --git a/Triangulation_2/include/CGAL/predicates/Regular_triangulation_rtH2.h b/Triangulation_2/include/CGAL/predicates/Regular_triangulation_rtH2.h index 66c5410f736..6b7c5a1703d 100644 --- a/Triangulation_2/include/CGAL/predicates/Regular_triangulation_rtH2.h +++ b/Triangulation_2/include/CGAL/predicates/Regular_triangulation_rtH2.h @@ -76,7 +76,7 @@ power_testH2( const RT &phx, const RT &phy, const RT &phw, const RT &pwt, RT dthw = CGAL_NTS square(thw); RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) - twt*dthw; - return Oriented_side(sign_of_determinant4x4(dphx, dphy, dpz, dphw, + return Oriented_side(sign_of_determinant(dphx, dphy, dpz, dphw, dqhx, dqhy, dqz, dqhw, drhx, drhy, drz, drhw, dthx, dthy, dtz, dthw)); @@ -116,7 +116,7 @@ power_testH2( const RT &phx, const RT &phy, const RT &phw, const RT &pwt, RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) - twt*dthw; return Oriented_side(CGAL_NTS compare(pa, qa) * - sign_of_determinant3x3(pa, dpz, dphw, + sign_of_determinant(pa, dpz, dphw, qa, dqz, dqhw, ta, dtz, dthw)); } diff --git a/Triangulation_3/include/CGAL/predicates/Regular_triangulation_ftC3.h b/Triangulation_3/include/CGAL/predicates/Regular_triangulation_ftC3.h index 42fe6ff465d..ebc210d3261 100644 --- a/Triangulation_3/include/CGAL/predicates/Regular_triangulation_ftC3.h +++ b/Triangulation_3/include/CGAL/predicates/Regular_triangulation_ftC3.h @@ -57,7 +57,7 @@ power_testC3( const FT &px, const FT &py, const FT &pz, const FT &pwt, FT dst = CGAL_NTS square(dsx) + CGAL_NTS square(dsy) + CGAL_NTS square(dsz) - swt + twt; - return Oriented_side( - sign_of_determinant4x4(dpx, dpy, dpz, dpt, + return Oriented_side( - sign_of_determinant(dpx, dpy, dpz, dpt, dqx, dqy, dqz, dqt, drx, dry, drz, drt, dsx, dsy, dsz, dst)); @@ -90,26 +90,26 @@ power_testC3( const FT &px, const FT &py, const FT &pz, const FT &pwt, Sign cmp; // Projection on the (xy) plane. - cmp = sign_of_determinant3x3(dpx, dpy, dpt, + cmp = sign_of_determinant(dpx, dpy, dpt, dqx, dqy, dqt, drx, dry, drt); if (cmp != ZERO) - return Oriented_side(cmp * sign_of_determinant2x2(px-rx, py-ry, + return Oriented_side(cmp * sign_of_determinant(px-rx, py-ry, qx-rx, qy-ry)); // Projection on the (xz) plane. - cmp = sign_of_determinant3x3(dpx, dpz, dpt, + cmp = sign_of_determinant(dpx, dpz, dpt, dqx, dqz, dqt, drx, drz, drt); if (cmp != ZERO) - return Oriented_side(cmp * sign_of_determinant2x2(px-rx, pz-rz, + return Oriented_side(cmp * sign_of_determinant(px-rx, pz-rz, qx-rx, qz-rz)); // Projection on the (yz) plane. - cmp = sign_of_determinant3x3(dpy, dpz, dpt, + cmp = sign_of_determinant(dpy, dpz, dpt, dqy, dqz, dqt, dry, drz, drt); - return Oriented_side(cmp * sign_of_determinant2x2(py-ry, pz-rz, + return Oriented_side(cmp * sign_of_determinant(py-ry, pz-rz, qy-ry, qz-rz)); } @@ -136,16 +136,16 @@ power_testC3( const FT &px, const FT &py, const FT &pz, const FT &pwt, // We do an orthogonal projection on the (x) axis, if possible. cmp = CGAL_NTS compare(px, qx); if (cmp != EQUAL) - return Oriented_side(cmp * sign_of_determinant2x2(dpx, dpt, dqx, dqt)); + return Oriented_side(cmp * sign_of_determinant(dpx, dpt, dqx, dqt)); // We do an orthogonal projection on the (y) axis, if possible. cmp = CGAL_NTS compare(py, qy); if (cmp != EQUAL) - return Oriented_side(cmp * sign_of_determinant2x2(dpy, dpt, dqy, dqt)); + return Oriented_side(cmp * sign_of_determinant(dpy, dpt, dqy, dqt)); // We do an orthogonal projection on the (z) axis. cmp = CGAL_NTS compare(pz, qz); - return Oriented_side(cmp * sign_of_determinant2x2(dpz, dpt, dqz, dqt)); + return Oriented_side(cmp * sign_of_determinant(dpz, dpt, dqz, dqt)); } template diff --git a/Triangulation_3/include/CGAL/predicates/Regular_triangulation_rtH3.h b/Triangulation_3/include/CGAL/predicates/Regular_triangulation_rtH3.h index 14b40143aef..8863e6a5f81 100644 --- a/Triangulation_3/include/CGAL/predicates/Regular_triangulation_rtH3.h +++ b/Triangulation_3/include/CGAL/predicates/Regular_triangulation_rtH3.h @@ -71,7 +71,7 @@ power_testH3( RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) + CGAL_NTS square(thz) - twt*dthw; - return Oriented_side(- sign_of_determinant5x5(dphx, dphy, dphz, dpz, dphw, + return Oriented_side(- sign_of_determinant(dphx, dphy, dphz, dpz, dphw, dqhx, dqhy, dqhz, dqz, dqhw, drhx, drhy, drhz, drz, drhw, dshx, dshy, dshz, dsz, dshw,