Rename the following functions:

det2x2_by_formula
  det3x3_by_formula
  det4x4_by_formula
  det5x5_by_formula
  det6x6_by_formula
to:
  determinant

How cute...  a name independent of the dimension, and even readable !
This commit is contained in:
Sylvain Pion 2008-04-09 13:35:34 +00:00
parent af5ffdecae
commit 1d8779b171
45 changed files with 286 additions and 286 deletions

View File

@ -44,11 +44,11 @@ squared_radius_orthogonalcircleC2(
FT dpp = CGAL_NTS square(dpx)+CGAL_NTS square(dpy)-pw+rw; FT dpp = CGAL_NTS square(dpx)+CGAL_NTS square(dpy)-pw+rw;
FT dqq = CGAL_NTS square(dqx)+CGAL_NTS square(dqy)-qw+rw; FT dqq = CGAL_NTS square(dqx)+CGAL_NTS square(dqy)-qw+rw;
FT det0 = det2x2_by_formula(dpx, dpy, dqx, dqy); FT det0 = determinant(dpx, dpy, dqx, dqy);
FT det1 = det2x2_by_formula(dpp, dpy, dqq, dqy); FT det1 = determinant(dpp, dpy, dqq, dqy);
FT det2 = det2x2_by_formula(dpx, dpp, dqx, dqq); FT det2 = determinant(dpx, dpp, dqx, dqq);
return return
(CGAL_NTS square(det1)+CGAL_NTS square(det2))/ (CGAL_NTS square(det1)+CGAL_NTS square(det2))/

View File

@ -65,9 +65,9 @@ w_plane_tangent_line_2(const FT &x1, const FT &y1, const FT &w1,
FT Dv = v2 - v3; FT Dv = v2 - v3;
FT Dr = r2 - r3; FT Dr = r2 - r3;
FT Duv = det2x2_by_formula(u2, v2, u3, v3); FT Duv = determinant(u2, v2, u3, v3);
FT Dur = det2x2_by_formula(u2, r2, u3, r3); FT Dur = determinant(u2, r2, u3, r3);
FT Dvr = det2x2_by_formula(v2, r2, v3, r3); FT Dvr = determinant(v2, r2, v3, r3);
FT D1 = CGAL::square(Du) + CGAL::square(Dv); FT D1 = CGAL::square(Du) + CGAL::square(Dv);
FT D1inv = FT(1) / D1; FT D1inv = FT(1) / D1;
@ -162,9 +162,9 @@ ad_left_bitangent_lineC2(const FT &x1, const FT &y1, const FT &w1,
FT dy = y1 - y2; FT dy = y1 - y2;
FT dw = w1 - w2; FT dw = w1 - w2;
FT dxw = det2x2_by_formula(x1, w1, x2, w2); FT dxw = determinant(x1, w1, x2, w2);
FT dyw = det2x2_by_formula(y1, w1, y2, w2); FT dyw = determinant(y1, w1, y2, w2);
FT dxy = det2x2_by_formula(x1, y1, x2, y2); FT dxy = determinant(x1, y1, x2, y2);
FT D1 = CGAL::square(dx) + CGAL::square(dy); FT D1 = CGAL::square(dx) + CGAL::square(dy);
FT invD1 = FT(1) / D1; FT invD1 = FT(1) / D1;

View File

@ -101,13 +101,13 @@ public:
FT pk = CGAL::square(xk) + CGAL::square(yk) - CGAL::square(rk); FT pk = CGAL::square(xk) + CGAL::square(yk) - CGAL::square(rk);
FT pl = CGAL::square(xl) + CGAL::square(yl) - CGAL::square(rl); FT pl = CGAL::square(xl) + CGAL::square(yl) - CGAL::square(rl);
FT Exp = det2x2_by_formula(xj, pj, xk, pk); FT Exp = determinant(xj, pj, xk, pk);
FT Eyp = det2x2_by_formula(yj, pj, yk, pk); FT Eyp = determinant(yj, pj, yk, pk);
FT Erp = det2x2_by_formula(rj, pj, rk, pk); FT Erp = determinant(rj, pj, rk, pk);
FT Exy = det2x2_by_formula(xj, yj, xk, yk); FT Exy = determinant(xj, yj, xk, yk);
FT Exr = det2x2_by_formula(xj, rj, xk, rk); FT Exr = determinant(xj, rj, xk, rk);
FT Eyr = det2x2_by_formula(yj, rj, yk, rk); FT Eyr = determinant(yj, rj, yk, rk);
FT Exyp = xl * Eyp - yl * Exp + pl * Exy; FT Exyp = xl * Eyp - yl * Exp + pl * Exy;
FT Exrp = xl * Erp - rl * Exp + pl * Exr; FT Exrp = xl * Erp - rl * Exp + pl * Exr;

View File

@ -155,7 +155,7 @@ public:
const FT& D, const FT& P) const const FT& D, const FT& P) const
{ {
FT sigma = a * A + b * B; FT sigma = a * A + b * B;
FT delta = det2x2_by_formula(a, b, A, B); FT delta = determinant(a, b, A, B);
Sign sign_sigma = CGAL::sign(sigma); Sign sign_sigma = CGAL::sign(sigma);
Sign sign_delta = CGAL::sign(delta); Sign sign_delta = CGAL::sign(delta);

View File

@ -118,15 +118,15 @@ public:
FT pj = CGAL::square(xj) + CGAL::square(yj) - CGAL::square(rj); FT pj = CGAL::square(xj) + CGAL::square(yj) - CGAL::square(rj);
FT pk = CGAL::square(xk) + CGAL::square(yk) - CGAL::square(rk); FT pk = CGAL::square(xk) + CGAL::square(yk) - CGAL::square(rk);
FT Exp = det2x2_by_formula(xj, pj, xk, pk); FT Exp = determinant(xj, pj, xk, pk);
FT Eyp = det2x2_by_formula(yj, pj, yk, pk); FT Eyp = determinant(yj, pj, yk, pk);
FT Erp = det2x2_by_formula(rj, pj, rk, pk); FT Erp = determinant(rj, pj, rk, pk);
FT Exy = det2x2_by_formula(xj, yj, xk, yk); FT Exy = determinant(xj, yj, xk, yk);
FT Exr = det2x2_by_formula(xj, rj, xk, rk); FT Exr = determinant(xj, rj, xk, rk);
FT Eyr = det2x2_by_formula(yj, rj, yk, rk); FT Eyr = determinant(yj, rj, yk, rk);
FT Exy2 = 2 * det2x2_by_formula(xl, yl, xm, ym); FT Exy2 = 2 * determinant(xl, yl, xm, ym);
FT A = (Exp * Exr + Eyp * Eyr) * Exy2 + (Eyp * dx - Exp * dy) * Erp; FT A = (Exp * Exr + Eyp * Eyr) * Exy2 + (Eyp * dx - Exp * dy) * Erp;
FT B = Exy * Exy2 - Exp * dx - Eyp * dy; FT B = Exy * Exy2 - Exp * dx - Eyp * dy;
@ -194,13 +194,13 @@ public:
pj = nj - CGAL::square(rj); pj = nj - CGAL::square(rj);
pk = nk - CGAL::square(rk); pk = nk - CGAL::square(rk);
Exp = det2x2_by_formula(xj, pj, xk, pk); Exp = determinant(xj, pj, xk, pk);
Eyp = det2x2_by_formula(yj, pj, yk, pk); Eyp = determinant(yj, pj, yk, pk);
Erp = det2x2_by_formula(rj, pj, rk, pk); Erp = determinant(rj, pj, rk, pk);
Exy = det2x2_by_formula(xj, yj, xk, yk); Exy = determinant(xj, yj, xk, yk);
Exr = det2x2_by_formula(xj, rj, xk, rk); Exr = determinant(xj, rj, xk, rk);
Eyr = det2x2_by_formula(yj, rj, yk, rk); Eyr = determinant(yj, rj, yk, rk);
A1 = Exp * Exr + Eyp * Eyr; A1 = Exp * Exr + Eyp * Eyr;
@ -284,7 +284,7 @@ private:
FT dx = xl - xm; FT dx = xl - xm;
FT dy = yl - ym; FT dy = yl - ym;
FT Exy2 = 2 * det2x2_by_formula(xl, yl, xm, ym); FT Exy2 = 2 * determinant(xl, yl, xm, ym);
FT A = A1 * Exy2 + (Eyp * dx - Exp * dy) * Erp; FT A = A1 * Exy2 + (Eyp * dx - Exp * dy) * Erp;
FT B = Exy * Exy2 - Exp * dx - Eyp * dy; FT B = Exy * Exy2 - Exp * dx - Eyp * dy;

View File

@ -62,7 +62,7 @@ private:
FT b = vc.b1() + vc.b2() * CGAL::sqrt(vc.delta()); FT b = vc.b1() + vc.b2() * CGAL::sqrt(vc.delta());
FT det1 = a * (p2.y() - p1.y()) - b * (p2.x() - p1.x()); FT det1 = a * (p2.y() - p1.y()) - b * (p2.x() - p1.x());
FT c = vc.c1() + vc.c2() * CGAL::sqrt(vc.delta()); FT c = vc.c1() + vc.c2() * CGAL::sqrt(vc.delta());
FT det2 = det2x2_by_formula(p1.x() - sp1.x(), p1.y() - sp1.y(), FT det2 = determinant(p1.x() - sp1.x(), p1.y() - sp1.y(),
p2.x() - sp1.x(), p2.y() - sp1.y()); p2.x() - sp1.x(), p2.y() - sp1.y());
return CGAL::sign(det1 + FT(2) * c * det2); return CGAL::sign(det1 + FT(2) * c * det2);
} }
@ -73,7 +73,7 @@ private:
{ {
FT dx = p2.x() - p1.x(); FT dx = p2.x() - p1.x();
FT dy = p2.y() - p1.y(); FT dy = p2.y() - p1.y();
FT det1 = det2x2_by_formula(p1.x() - sp1.x(), p1.y() - sp1.y(), FT det1 = determinant(p1.x() - sp1.x(), p1.y() - sp1.y(),
p2.x() - sp1.x(), p2.y() - sp1.y()); p2.x() - sp1.x(), p2.y() - sp1.y());
FT A = vc.a1() * dy - vc.b1() * dx + FT(2) * vc.c1() * det1; FT A = vc.a1() * dy - vc.b1() * dx + FT(2) * vc.c1() * det1;
FT B = vc.a2() * dy - vc.b2() * dx + FT(2) * vc.c2() * det1; FT B = vc.a2() * dy - vc.b2() * dx + FT(2) * vc.c2() * det1;

View File

@ -100,12 +100,12 @@ public:
Voronoi_radius_2(const Inverted_weighted_point& u1, Voronoi_radius_2(const Inverted_weighted_point& u1,
const Inverted_weighted_point& u2) const Inverted_weighted_point& u2)
{ {
FT dxp = det2x2_by_formula(u1.x(), u1.p(), u2.x(), u2.p()); FT dxp = determinant(u1.x(), u1.p(), u2.x(), u2.p());
FT dyp = det2x2_by_formula(u1.y(), u1.p(), u2.y(), u2.p()); FT dyp = determinant(u1.y(), u1.p(), u2.y(), u2.p());
FT dwp = det2x2_by_formula(u1.weight(), u1.p(), u2.weight(), u2.p()); FT dwp = determinant(u1.weight(), u1.p(), u2.weight(), u2.p());
FT dxy = det2x2_by_formula(u1.x(), u1.y(), u2.x(), u2.y()); FT dxy = determinant(u1.x(), u1.y(), u2.x(), u2.y());
FT dxw = det2x2_by_formula(u1.x(), u1.weight(), u2.x(), u2.weight()); FT dxw = determinant(u1.x(), u1.weight(), u2.x(), u2.weight());
FT dyw = det2x2_by_formula(u1.y(), u1.weight(), u2.y(), u2.weight()); FT dyw = determinant(u1.y(), u1.weight(), u2.y(), u2.weight());
_a = CGAL::square(dxp) + CGAL::square(dyp); _a = CGAL::square(dxp) + CGAL::square(dyp);
_b = dxp * dxw + dyp * dyw; _b = dxp * dxw + dyp * dyw;
@ -193,9 +193,9 @@ public:
FT dx = p1.x() - p2.x(); FT dx = p1.x() - p2.x();
FT dy = p1.y() - p2.y(); FT dy = p1.y() - p2.y();
FT dw = p1.weight() - p2.weight(); FT dw = p1.weight() - p2.weight();
FT dxy = det2x2_by_formula(p1.x(), p1.y(), p2.x(), p2.y()); FT dxy = determinant(p1.x(), p1.y(), p2.x(), p2.y());
FT dxw = det2x2_by_formula(p1.x(), p1.weight(), p2.x(), p2.weight()); FT dxw = determinant(p1.x(), p1.weight(), p2.x(), p2.weight());
FT dyw = det2x2_by_formula(p1.y(), p1.weight(), p2.y(), p2.weight()); FT dyw = determinant(p1.y(), p1.weight(), p2.y(), p2.weight());
store(dx, dy, dw, dxy, dxw, dyw); store(dx, dy, dw, dxy, dxw, dyw);
} }
@ -204,12 +204,12 @@ public:
Bitangent_line_2(const Inverted_weighted_point& u1, Bitangent_line_2(const Inverted_weighted_point& u1,
const Inverted_weighted_point& u2) const Inverted_weighted_point& u2)
{ {
FT dxp = det2x2_by_formula(u1.x(), u1.p(), u2.x(), u2.p()); FT dxp = determinant(u1.x(), u1.p(), u2.x(), u2.p());
FT dyp = det2x2_by_formula(u1.y(), u1.p(), u2.y(), u2.p()); FT dyp = determinant(u1.y(), u1.p(), u2.y(), u2.p());
FT dwp = det2x2_by_formula(u1.weight(), u1.p(), u2.weight(), u2.p()); FT dwp = determinant(u1.weight(), u1.p(), u2.weight(), u2.p());
FT dxy = det2x2_by_formula(u1.x(), u1.y(), u2.x(), u2.y()); FT dxy = determinant(u1.x(), u1.y(), u2.x(), u2.y());
FT dxw = det2x2_by_formula(u1.x(), u1.weight(), u2.x(), u2.weight()); FT dxw = determinant(u1.x(), u1.weight(), u2.x(), u2.weight());
FT dyw = det2x2_by_formula(u1.y(), u1.weight(), u2.y(), u2.weight()); FT dyw = determinant(u1.y(), u1.weight(), u2.y(), u2.weight());
store(dxp, dyp, dwp, dxy, dxw, dyw); store(dxp, dyp, dwp, dxy, dxw, dyw);
} }
@ -315,13 +315,13 @@ public:
const Inverted_weighted_point& u2, const Inverted_weighted_point& u2,
const Inverted_weighted_point& u3) const const Inverted_weighted_point& u3) const
{ {
FT dx1 = det2x2_by_formula(u2.x(), u2.p(), u1.x(), u1.p()); FT dx1 = determinant(u2.x(), u2.p(), u1.x(), u1.p());
FT dy1 = det2x2_by_formula(u2.y(), u2.p(), u1.y(), u1.p()); FT dy1 = determinant(u2.y(), u2.p(), u1.y(), u1.p());
FT dw1 = det2x2_by_formula(u2.weight(), u2.p(), u1.weight(), u1.p()); FT dw1 = determinant(u2.weight(), u2.p(), u1.weight(), u1.p());
FT dx3 = det2x2_by_formula(u3.x(), u3.p(), u2.x(), u2.p()); FT dx3 = determinant(u3.x(), u3.p(), u2.x(), u2.p());
FT dy3 = det2x2_by_formula(u3.y(), u3.p(), u2.y(), u2.p()); FT dy3 = determinant(u3.y(), u3.p(), u2.y(), u2.p());
FT dw3 = det2x2_by_formula(u3.weight(), u3.p(), u2.weight(), u2.p()); FT dw3 = determinant(u3.weight(), u3.p(), u2.weight(), u2.p());
FT u2Pv2 = CGAL::square(u2.x()) + CGAL::square(u2.y()); FT u2Pv2 = CGAL::square(u2.x()) + CGAL::square(u2.y());
FT u2Mv2 = CGAL::square(u2.x()) - CGAL::square(u2.y()); FT u2Mv2 = CGAL::square(u2.x()) - CGAL::square(u2.y());

View File

@ -58,15 +58,15 @@ protected:
const Inverted_weighted_point &p3, int i) const const Inverted_weighted_point &p3, int i) const
{ {
Sign s = CGAL::sign( Sign s = CGAL::sign(
CGAL::square(det3x3_by_formula<RT>( CGAL::square(determinant<RT>(
p1.p(), p1.weight(), p1.y(), p1.p(), p1.weight(), p1.y(),
p2.p(), p2.weight(), p2.y(), p2.p(), p2.weight(), p2.y(),
p3.p(), p3.weight(), p3.y())) p3.p(), p3.weight(), p3.y()))
+ CGAL::square(det3x3_by_formula<RT>( + CGAL::square(determinant<RT>(
p1.p(), p1.x(), p1.weight(), p1.p(), p1.x(), p1.weight(),
p2.p(), p2.x(), p2.weight(), p2.p(), p2.x(), p2.weight(),
p3.p(), p3.x(), p3.weight())) p3.p(), p3.x(), p3.weight()))
- CGAL::square(det3x3_by_formula<RT>( - CGAL::square(determinant<RT>(
p1.p(), p1.x(), p1.y(), p1.p(), p1.x(), p1.y(),
p2.p(), p2.x(), p2.y(), p2.p(), p2.x(), p2.y(),
p3.p(), p3.x(), p3.y()))); p3.p(), p3.x(), p3.y())));
@ -91,17 +91,17 @@ protected:
CGAL_assertion(i == -1 || i == 1 || i == 2 || i == 3); CGAL_assertion(i == -1 || i == 1 || i == 2 || i == 3);
Sign s = -CGAL::sign( Sign s = -CGAL::sign(
det2x2_by_formula<RT>( determinant<RT>(
p1.p(), p1.x(), p1.p(), p1.x(),
p2.p(), p2.x()) p2.p(), p2.x())
* det3x3_by_formula<RT>( * determinant<RT>(
p1.p(), p1.weight(), p1.x(), p1.p(), p1.weight(), p1.x(),
p2.p(), p2.weight(), p2.x(), p2.p(), p2.weight(), p2.x(),
p3.p(), p3.weight(), p3.x()) p3.p(), p3.weight(), p3.x())
+ det2x2_by_formula<RT>( + determinant<RT>(
p1.p(), p1.y(), p1.p(), p1.y(),
p2.p(), p2.y()) p2.p(), p2.y())
* det3x3_by_formula<RT>( * determinant<RT>(
p1.p(), p1.weight(), p1.y(), p1.p(), p1.weight(), p1.y(),
p2.p(), p2.weight(), p2.y(), p2.p(), p2.weight(), p2.y(),
p3.p(), p3.weight(), p3.y())); p3.p(), p3.weight(), p3.y()));

View File

@ -159,7 +159,7 @@ protected:
bool right(const Point_2& p) const bool right(const Point_2& p) const
{ {
return return
CGAL::is_negative( det3x3_by_formula<FT>(f1.x(), f1.y(), 1, CGAL::is_negative( determinant<FT>(f1.x(), f1.y(), 1,
f2.x(), f2.y(), 1, f2.x(), f2.y(), 1,
p.x(), p.y(), 1) ); p.x(), p.y(), 1) );
} }

View File

@ -191,7 +191,7 @@ protected:
bool right(const Point_2& p) const bool right(const Point_2& p) const
{ {
return return
CGAL::is_positive( det3x3_by_formula<FT>(c.x(), c.y(), FT(1), CGAL::is_positive( determinant<FT>(c.x(), c.y(), FT(1),
o.x(), o.y(), FT(1), o.x(), o.y(), FT(1),
p.x(), p.y(), FT(1)) ); p.x(), p.y(), FT(1)) );
} }

View File

@ -206,22 +206,22 @@ typename Aff_transformation_repC3<R>::Aff_transformation_3
Aff_transformation_repC3<R>::inverse() const // FIXME : construction Aff_transformation_repC3<R>::inverse() const // FIXME : construction
{ {
return Aff_transformation_3( return Aff_transformation_3(
det2x2_by_formula( t22, t23, t32, t33), // i 11 determinant( t22, t23, t32, t33), // i 11
-det2x2_by_formula( t12, t13, t32, t33), // i 12 -determinant( t12, t13, t32, t33), // i 12
det2x2_by_formula( t12, t13, t22, t23), // i 13 determinant( t12, t13, t22, t23), // i 13
-det3x3_by_formula( t12, t13, t14, t22, t23, t24, t32, t33, t34 ), -determinant( t12, t13, t14, t22, t23, t24, t32, t33, t34 ),
-det2x2_by_formula( t21, t23, t31, t33), // i 21 -determinant( t21, t23, t31, t33), // i 21
det2x2_by_formula( t11, t13, t31, t33), // i 22 determinant( t11, t13, t31, t33), // i 22
-det2x2_by_formula( t11, t13, t21, t23), // i 23 -determinant( t11, t13, t21, t23), // i 23
det3x3_by_formula( t11, t13, t14, t21, t23, t24, t31, t33, t34 ), determinant( t11, t13, t14, t21, t23, t24, t31, t33, t34 ),
det2x2_by_formula( t21, t22, t31, t32), // i 31 determinant( t21, t22, t31, t32), // i 31
-det2x2_by_formula( t11, t12, t31, t32), // i 32 -determinant( t11, t12, t31, t32), // i 32
det2x2_by_formula( t11, t12, t21, t22), // i 33 determinant( t11, t12, t21, t22), // i 33
-det3x3_by_formula( t11, t12, t14, t21, t22, t24, t31, t32, t34 ), -determinant( t11, t12, t14, t21, t22, t24, t31, t32, t34 ),
det3x3_by_formula( t11, t12, t13, t21, t22, t23, t31, t32, t33 )); determinant( t11, t12, t13, t21, t22, t23, t31, t32, t33 ));
} }
template < class R > template < class R >

View File

@ -769,7 +769,7 @@ namespace CartesianKernelFunctors {
FT v1y = q.y() - p.y(); FT v1y = q.y() - p.y();
FT v2x = r.x() - p.x(); FT v2x = r.x() - p.x();
FT v2y = r.y() - p.y(); FT v2y = r.y() - p.y();
return det2x2_by_formula(v1x, v1y, v2x, v2y)/2; return determinant(v1x, v1y, v2x, v2y)/2;
} }
result_type result_type
@ -793,7 +793,7 @@ namespace CartesianKernelFunctors {
result_type result_type
operator()(const Vector_2& v, const Vector_2& w) const operator()(const Vector_2& v, const Vector_2& w) const
{ {
return det2x2_by_formula(v.x(), v.y(), w.x(), w.y()); return determinant(v.x(), v.y(), w.x(), w.y());
} }
}; };
@ -809,7 +809,7 @@ namespace CartesianKernelFunctors {
result_type result_type
operator()(const Vector_3& v, const Vector_3& w, const Vector_3& t) const operator()(const Vector_3& v, const Vector_3& w, const Vector_3& t) const
{ {
return det3x3_by_formula(v.x(), v.y(), v.z(), return determinant(v.x(), v.y(), v.z(),
w.x(), w.y(), w.z(), w.x(), w.y(), w.z(),
t.x(), t.y(), t.z()); t.x(), t.y(), t.z());
} }
@ -984,7 +984,7 @@ namespace CartesianKernelFunctors {
operator()(const Point_3& p0, const Point_3& p1, operator()(const Point_3& p0, const Point_3& p1,
const Point_3& p2, const Point_3& p3) const const Point_3& p2, const Point_3& p3) const
{ {
return det3x3_by_formula<FT>(p1.x()-p0.x(), p1.y()-p0.y(), p1.z()-p0.z(), return determinant<FT>(p1.x()-p0.x(), p1.y()-p0.y(), p1.z()-p0.z(),
p2.x()-p0.x(), p2.y()-p0.y(), p2.z()-p0.z(), p2.x()-p0.x(), p2.y()-p0.y(), p2.z()-p0.z(),
p3.x()-p0.x(), p3.y()-p0.y(), p3.z()-p0.z())/6; p3.x()-p0.x(), p3.y()-p0.y(), p3.z()-p0.z())/6;
} }
@ -1846,24 +1846,24 @@ namespace CartesianKernelFunctors {
// The following determinants can be developped and simplified. // The following determinants can be developped and simplified.
// //
// FT num_x = det3x3_by_formula(psy,psz,ps2, // FT num_x = determinant(psy,psz,ps2,
// qsy,qsz,qs2, // qsy,qsz,qs2,
// rsy,rsz,0); // rsy,rsz,0);
// FT num_y = det3x3_by_formula(psx,psz,ps2, // FT num_y = determinant(psx,psz,ps2,
// qsx,qsz,qs2, // qsx,qsz,qs2,
// rsx,rsz,0); // rsx,rsz,0);
// FT num_z = det3x3_by_formula(psx,psy,ps2, // FT num_z = determinant(psx,psy,ps2,
// qsx,qsy,qs2, // qsx,qsy,qs2,
// rsx,rsy,0); // rsx,rsy,0);
FT num_x = ps2 * det2x2_by_formula(qsy,qsz,rsy,rsz) FT num_x = ps2 * determinant(qsy,qsz,rsy,rsz)
- qs2 * det2x2_by_formula(psy,psz,rsy,rsz); - qs2 * determinant(psy,psz,rsy,rsz);
FT num_y = ps2 * det2x2_by_formula(qsx,qsz,rsx,rsz) FT num_y = ps2 * determinant(qsx,qsz,rsx,rsz)
- qs2 * det2x2_by_formula(psx,psz,rsx,rsz); - qs2 * determinant(psx,psz,rsx,rsz);
FT num_z = ps2 * det2x2_by_formula(qsx,qsy,rsx,rsy) FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy)
- qs2 * det2x2_by_formula(psx,psy,rsx,rsy); - qs2 * determinant(psx,psy,rsx,rsy);
FT den = det3x3_by_formula(psx,psy,psz, FT den = determinant(psx,psy,psz,
qsx,qsy,qsz, qsx,qsy,qsz,
rsx,rsy,rsz); rsx,rsy,rsz);
@ -1901,16 +1901,16 @@ namespace CartesianKernelFunctors {
FT spz = s.z()-p.z(); FT spz = s.z()-p.z();
FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) + CGAL_NTS square(spz); FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) + CGAL_NTS square(spz);
FT num_x = det3x3_by_formula(qpy,qpz,qp2, FT num_x = determinant(qpy,qpz,qp2,
rpy,rpz,rp2, rpy,rpz,rp2,
spy,spz,sp2); spy,spz,sp2);
FT num_y = det3x3_by_formula(qpx,qpz,qp2, FT num_y = determinant(qpx,qpz,qp2,
rpx,rpz,rp2, rpx,rpz,rp2,
spx,spz,sp2); spx,spz,sp2);
FT num_z = det3x3_by_formula(qpx,qpy,qp2, FT num_z = determinant(qpx,qpy,qp2,
rpx,rpy,rp2, rpx,rpy,rp2,
spx,spy,sp2); spx,spy,sp2);
FT den = det3x3_by_formula(qpx,qpy,qpz, FT den = determinant(qpx,qpy,qpz,
rpx,rpy,rpz, rpx,rpy,rpz,
spx,spy,spz); spx,spy,spz);
CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) ); CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) );
@ -2149,24 +2149,24 @@ namespace CartesianKernelFunctors {
// The following determinants can be developped and simplified. // The following determinants can be developped and simplified.
// //
// FT num_x = det3x3_by_formula(psy,psz,ps2, // FT num_x = determinant(psy,psz,ps2,
// qsy,qsz,qs2, // qsy,qsz,qs2,
// rsy,rsz,0); // rsy,rsz,0);
// FT num_y = det3x3_by_formula(psx,psz,ps2, // FT num_y = determinant(psx,psz,ps2,
// qsx,qsz,qs2, // qsx,qsz,qs2,
// rsx,rsz,0); // rsx,rsz,0);
// FT num_z = det3x3_by_formula(psx,psy,ps2, // FT num_z = determinant(psx,psy,ps2,
// qsx,qsy,qs2, // qsx,qsy,qs2,
// rsx,rsy,0); // rsx,rsy,0);
FT num_x = ps2 * det2x2_by_formula(qsy,qsz,rsy,rsz) FT num_x = ps2 * determinant(qsy,qsz,rsy,rsz)
- qs2 * det2x2_by_formula(psy,psz,rsy,rsz); - qs2 * determinant(psy,psz,rsy,rsz);
FT num_y = ps2 * det2x2_by_formula(qsx,qsz,rsx,rsz) FT num_y = ps2 * determinant(qsx,qsz,rsx,rsz)
- qs2 * det2x2_by_formula(psx,psz,rsx,rsz); - qs2 * determinant(psx,psz,rsx,rsz);
FT num_z = ps2 * det2x2_by_formula(qsx,qsy,rsx,rsy) FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy)
- qs2 * det2x2_by_formula(psx,psy,rsx,rsy); - qs2 * determinant(psx,psy,rsx,rsy);
FT den = det3x3_by_formula(psx,psy,psz, FT den = determinant(psx,psy,psz,
qsx,qsy,qsz, qsx,qsy,qsz,
rsx,rsy,rsz); rsx,rsy,rsz);

View File

@ -53,7 +53,7 @@ circumcenter_translateC2(const FT &dqx, const FT &dqy,
// What we do is intersect the bisectors. // What we do is intersect the bisectors.
FT r2 = CGAL_NTS square(drx) + CGAL_NTS square(dry); FT r2 = CGAL_NTS square(drx) + CGAL_NTS square(dry);
FT q2 = CGAL_NTS square(dqx) + CGAL_NTS square(dqy); FT q2 = CGAL_NTS square(dqx) + CGAL_NTS square(dqy);
FT den = 2 * det2x2_by_formula(dqx, dqy, drx, dry); FT den = 2 * determinant(dqx, dqy, drx, dry);
// The 3 points aren't collinear. // The 3 points aren't collinear.
// Hopefully, this is already checked at the upper level. // Hopefully, this is already checked at the upper level.
@ -61,8 +61,8 @@ circumcenter_translateC2(const FT &dqx, const FT &dqy,
// One possible optimization here is to precompute 1/den, to avoid one // One possible optimization here is to precompute 1/den, to avoid one
// division. However, we loose precision, and it's maybe not worth it (?). // division. However, we loose precision, and it's maybe not worth it (?).
dcx = det2x2_by_formula (dry, dqy, r2, q2) / den; dcx = determinant (dry, dqy, r2, q2) / den;
dcy = - det2x2_by_formula (drx, dqx, r2, q2) / den; dcy = - determinant (drx, dqx, r2, q2) / den;
} }
template < class FT > template < class FT >
@ -338,7 +338,7 @@ scaled_distance_to_lineC2( const FT &px, const FT &py,
const FT &qx, const FT &qy, const FT &qx, const FT &qy,
const FT &rx, const FT &ry) const FT &rx, const FT &ry)
{ {
return det2x2_by_formula<FT>(px-rx, py-ry, qx-rx, qy-ry); return determinant<FT>(px-rx, py-ry, qx-rx, qy-ry);
} }
CGAL_END_NAMESPACE CGAL_END_NAMESPACE

View File

@ -87,16 +87,16 @@ squared_radiusC3(const FT &px, const FT &py, const FT &pz,
FT spz = sz-pz; FT spz = sz-pz;
FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) + CGAL_NTS square(spz); FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) + CGAL_NTS square(spz);
FT num_x = det3x3_by_formula(qpy,qpz,qp2, FT num_x = determinant(qpy,qpz,qp2,
rpy,rpz,rp2, rpy,rpz,rp2,
spy,spz,sp2); spy,spz,sp2);
FT num_y = det3x3_by_formula(qpx,qpz,qp2, FT num_y = determinant(qpx,qpz,qp2,
rpx,rpz,rp2, rpx,rpz,rp2,
spx,spz,sp2); spx,spz,sp2);
FT num_z = det3x3_by_formula(qpx,qpy,qp2, FT num_z = determinant(qpx,qpy,qp2,
rpx,rpy,rp2, rpx,rpy,rp2,
spx,spy,sp2); spx,spy,sp2);
FT den = det3x3_by_formula(qpx,qpy,qpz, FT den = determinant(qpx,qpy,qpz,
rpx,rpy,rpz, rpx,rpy,rpz,
spx,spy,spz); spx,spy,spz);
CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) ); CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) );
@ -125,14 +125,14 @@ squared_radiusC3(const FT &px, const FT &py, const FT &pz,
FT rsy = psz*qsx-psx*qsz; FT rsy = psz*qsx-psx*qsz;
FT rsz = psx*qsy-psy*qsx; FT rsz = psx*qsy-psy*qsx;
FT num_x = ps2 * det2x2_by_formula(qsy,qsz,rsy,rsz) FT num_x = ps2 * determinant(qsy,qsz,rsy,rsz)
- qs2 * det2x2_by_formula(psy,psz,rsy,rsz); - qs2 * determinant(psy,psz,rsy,rsz);
FT num_y = ps2 * det2x2_by_formula(qsx,qsz,rsx,rsz) FT num_y = ps2 * determinant(qsx,qsz,rsx,rsz)
- qs2 * det2x2_by_formula(psx,psz,rsx,rsz); - qs2 * determinant(psx,psz,rsx,rsz);
FT num_z = ps2 * det2x2_by_formula(qsx,qsy,rsx,rsy) FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy)
- qs2 * det2x2_by_formula(psx,psy,rsx,rsy); - qs2 * determinant(psx,psy,rsx,rsy);
FT den = det3x3_by_formula(psx,psy,psz, FT den = determinant(psx,psy,psz,
qsx,qsy,qsz, qsx,qsy,qsz,
rsx,rsy,rsz); rsx,rsy,rsz);
@ -254,7 +254,7 @@ scaled_distance_to_planeC3(
const FT &prx, const FT &pry, const FT &prz, const FT &prx, const FT &pry, const FT &prz,
const FT &px, const FT &py, const FT &pz) const FT &px, const FT &py, const FT &pz)
{ {
return det3x3_by_formula(ppx-px,ppy-py,ppz-pz, return determinant(ppx-px,ppy-py,ppz-pz,
pqx-px,pqy-py,pqz-pz, pqx-px,pqy-py,pqz-pz,
prx-px,pry-py,prz-pz); prx-px,pry-py,prz-pz);
} }

View File

@ -75,8 +75,8 @@ compare_xC2(const FT &px,
const FT &ha, const FT &hb, const FT &hc) const FT &ha, const FT &hb, const FT &hc)
{ {
// The abscissa of the intersection point is num/den. // The abscissa of the intersection point is num/den.
FT num = det2x2_by_formula( lb, lc, hb, hc); FT num = determinant( lb, lc, hb, hc);
FT den = det2x2_by_formula( la, lb, ha, hb); FT den = determinant( la, lb, ha, hb);
typename Sgn<FT>::result_type s = CGAL_NTS sign(den); typename Sgn<FT>::result_type s = CGAL_NTS sign(den);
CGAL_kernel_assertion( s != ZERO ); CGAL_kernel_assertion( s != ZERO );
return s * CGAL_NTS compare(px * den, num); return s * CGAL_NTS compare(px * den, num);
@ -90,20 +90,20 @@ compare_xC2(const FT &la, const FT &lb, const FT &lc,
const FT &h2a, const FT &h2b, const FT &h2c) const FT &h2a, const FT &h2b, const FT &h2c)
{ {
/* /*
FT num1 = det2x2_by_formula( lb, lc, h1b, h1c); FT num1 = determinant( lb, lc, h1b, h1c);
FT den1 = det2x2_by_formula( la, lb, h1a, h1b); FT den1 = determinant( la, lb, h1a, h1b);
FT num2 = det2x2_by_formula( lb, lc, h2b, h2c); FT num2 = determinant( lb, lc, h2b, h2c);
FT den2 = det2x2_by_formula( la, lb, h2a, h2b); FT den2 = determinant( la, lb, h2a, h2b);
Sign s = Sign (CGAL_NTS sign(den1) * CGAL_NTS sign(den2)); Sign s = Sign (CGAL_NTS sign(den1) * CGAL_NTS sign(den2));
CGAL_kernel_assertion( s != ZERO ); CGAL_kernel_assertion( s != ZERO );
return s * sign_of_determinant(num1, num2, den1, den2); return s * sign_of_determinant(num1, num2, den1, den2);
*/ */
FT num1 = det2x2_by_formula( la, lc, h1a, h1c); FT num1 = determinant( la, lc, h1a, h1c);
FT num2 = det2x2_by_formula( la, lc, h2a, h2c); FT num2 = determinant( la, lc, h2a, h2c);
FT num = det2x2_by_formula(h1a,h1c,h2a,h2c)*lb FT num = determinant(h1a,h1c,h2a,h2c)*lb
+ det2x2_by_formula(num1,num2,h1b,h2b); + determinant(num1,num2,h1b,h2b);
FT den1 = det2x2_by_formula( la, lb, h1a, h1b); FT den1 = determinant( la, lb, h1a, h1b);
FT den2 = det2x2_by_formula( la, lb, h2a, h2b); FT den2 = determinant( la, lb, h2a, h2b);
return CGAL_NTS sign(lb) * return CGAL_NTS sign(lb) *
CGAL_NTS sign(num) * CGAL_NTS sign(num) *
CGAL_NTS sign(den1) * CGAL_NTS sign(den1) *
@ -118,10 +118,10 @@ compare_xC2(const FT &l1a, const FT &l1b, const FT &l1c,
const FT &l2a, const FT &l2b, const FT &l2c, const FT &l2a, const FT &l2b, const FT &l2c,
const FT &h2a, const FT &h2b, const FT &h2c) const FT &h2a, const FT &h2b, const FT &h2c)
{ {
FT num1 = det2x2_by_formula( l1b, l1c, h1b, h1c); FT num1 = determinant( l1b, l1c, h1b, h1c);
FT den1 = det2x2_by_formula( l1a, l1b, h1a, h1b); FT den1 = determinant( l1a, l1b, h1a, h1b);
FT num2 = det2x2_by_formula( l2b, l2c, h2b, h2c); FT num2 = determinant( l2b, l2c, h2b, h2c);
FT den2 = det2x2_by_formula( l2a, l2b, h2a, h2b); FT den2 = determinant( l2a, l2b, h2a, h2b);
typename Sgn<FT>::result_type s = CGAL_NTS sign(den1) * CGAL_NTS sign(den2); typename Sgn<FT>::result_type s = CGAL_NTS sign(den1) * CGAL_NTS sign(den2);
CGAL_kernel_assertion( s != ZERO ); CGAL_kernel_assertion( s != ZERO );
return s * sign_of_determinant(num1, num2, den1, den2); return s * sign_of_determinant(num1, num2, den1, den2);
@ -175,8 +175,8 @@ compare_y_at_xC2(const FT &l1a, const FT &l1b, const FT &l1c,
const FT &h2a, const FT &h2b, const FT &h2c) const FT &h2a, const FT &h2b, const FT &h2c)
{ {
// The abscissa of the intersection point is num/den. // The abscissa of the intersection point is num/den.
FT num = det2x2_by_formula( l1b, l1c, l2b, l2c); FT num = determinant( l1b, l1c, l2b, l2c);
FT den = det2x2_by_formula( l1a, l1b, l2a, l2b); FT den = determinant( l1a, l1b, l2a, l2b);
typename Sgn<FT>::result_type s = CGAL_NTS sign(h1b) * typename Sgn<FT>::result_type s = CGAL_NTS sign(h1b) *
CGAL_NTS sign(h2b) * CGAL_NTS sign(h2b) *
CGAL_NTS sign(den); CGAL_NTS sign(den);

View File

@ -417,14 +417,14 @@ side_of_bounded_sphereC3(const FT &px, const FT &py, const FT &pz,
FT tsy = ty-sy; FT tsy = ty-sy;
FT tsz = tz-sz; FT tsz = tz-sz;
FT num_x = ps2 * det2x2_by_formula(qsy,qsz,rsy,rsz) FT num_x = ps2 * determinant(qsy,qsz,rsy,rsz)
- qs2 * det2x2_by_formula(psy,psz,rsy,rsz); - qs2 * determinant(psy,psz,rsy,rsz);
FT num_y = ps2 * det2x2_by_formula(qsx,qsz,rsx,rsz) FT num_y = ps2 * determinant(qsx,qsz,rsx,rsz)
- qs2 * det2x2_by_formula(psx,psz,rsx,rsz); - qs2 * determinant(psx,psz,rsx,rsz);
FT num_z = ps2 * det2x2_by_formula(qsx,qsy,rsx,rsy) FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy)
- qs2 * det2x2_by_formula(psx,psy,rsx,rsy); - qs2 * determinant(psx,psy,rsx,rsy);
FT den2 = 2 * det3x3_by_formula(psx,psy,psz, FT den2 = 2 * determinant(psx,psy,psz,
qsx,qsy,qsz, qsx,qsy,qsz,
rsx,rsy,rsz); rsx,rsy,rsz);

View File

@ -21,7 +21,7 @@
- Remove <FT> qualification for functions part of the NT interface - Remove <FT> qualification for functions part of the NT interface
(sign, compare...), for efficiency. (sign, compare...), for efficiency.
- Add <FT> qualification for functions which are not part of the - Add <FT> qualification for functions which are not part of the
NT interface (det3x3_by_formula...) to support GMP++ like types. NT interface (determinant...) to support GMP++ like types.
1 August 2005 Sylvain Pion 1 August 2005 Sylvain Pion
- Cartesian_converter : specialize when same_type<K1, K2>. - Cartesian_converter : specialize when same_type<K1, K2>.

View File

@ -110,7 +110,7 @@ wcross_tag(const typename K::Point_2 &p,
const K&, const K&,
const Homogeneous_tag&) const Homogeneous_tag&)
{ {
return det3x3_by_formula( return determinant(
p.hx(), q.hx(), r.hx(), p.hx(), q.hx(), r.hx(),
p.hy(), q.hy(), r.hy(), p.hy(), q.hy(), r.hy(),
p.hw(), q.hw(), r.hw()); p.hw(), q.hw(), r.hw());

View File

@ -143,7 +143,7 @@ private:
double prx = rx-px; double prx = rx-px;
double pry = ry-py; double pry = ry-py;
double det = det2x2_by_formula(pqx, pqy, double det = determinant(pqx, pqy,
prx, pry); prx, pry);
// Then semi-static filter. // Then semi-static filter.

View File

@ -42,7 +42,7 @@ class SF_Side_of_bounded_circle_3
F sq = t1*t1+t1*t1+t1*t1; // squares F sq = t1*t1+t1*t1+t1*t1; // squares
F n1 = t1*t1 - t1*t1; // normal vector F n1 = t1*t1 - t1*t1; // normal vector
F sq_n1 = n1*n1 + n1*n1 + n1*n1; F sq_n1 = n1*n1 + n1*n1 + n1*n1;
F det = det4x4_by_formula(t1, t1, t1, sq, F det = determinant(t1, t1, t1, sq,
t1, t1, t1, sq, t1, t1, t1, sq,
t1, t1, t1, sq, t1, t1, t1, sq,
n1, n1, n1, sq_n1); // Full det n1, n1, n1, sq_n1); // Full det
@ -99,7 +99,7 @@ public:
double v2 = CGAL_NTS square(vx) + CGAL_NTS square(vy) + double v2 = CGAL_NTS square(vx) + CGAL_NTS square(vy) +
CGAL_NTS square(vz); CGAL_NTS square(vz);
double det = det4x4_by_formula(ptx,pty,ptz,pt2, double det = determinant(ptx,pty,ptz,pt2,
rtx,rty,rtz,rt2, rtx,rty,rtz,rt2,
qtx,qty,qtz,qt2, qtx,qty,qtz,qt2,
vx,vy,vz,v2); vx,vy,vz,v2);

View File

@ -76,7 +76,7 @@ public:
double prx = rx - px; double prx = rx - px;
double pry = ry - py; double pry = ry - py;
double det = det2x2_by_formula(pqx, pqy, double det = determinant(pqx, pqy,
prx, pry); prx, pry);
// Then semi-static filter. // Then semi-static filter.
@ -111,7 +111,7 @@ public:
{ {
typedef Static_filter_error F; typedef Static_filter_error F;
F t1 = F(1, F::ulp()/2); // First translation F t1 = F(1, F::ulp()/2); // First translation
F det = det2x2_by_formula(t1, t1, F det = determinant(t1, t1,
t1, t1); // Full det t1, t1); // Full det
double err = det.error(); double err = det.error();
err += err * 2 * F::ulp(); // Correction due to "epsilon * maxx * maxy". err += err * 2 * F::ulp(); // Correction due to "epsilon * maxx * maxy".

View File

@ -97,7 +97,7 @@ public:
if (maxz < fabs(prz)) maxz = fabs(prz); if (maxz < fabs(prz)) maxz = fabs(prz);
if (maxz < fabs(psz)) maxz = fabs(psz); if (maxz < fabs(psz)) maxz = fabs(psz);
double eps = 5.1107127829973299e-15 * maxx * maxy * maxz; double eps = 5.1107127829973299e-15 * maxx * maxy * maxz;
double det = det3x3_by_formula(pqx, pqy, pqz, double det = determinant(pqx, pqy, pqz,
prx, pry, prz, prx, pry, prz,
psx, psy, psz); psx, psy, psz);
@ -131,7 +131,7 @@ public:
{ {
typedef Static_filter_error F; typedef Static_filter_error F;
F t1 = F(1, F::ulp()/2); // First translation F t1 = F(1, F::ulp()/2); // First translation
F det = det3x3_by_formula(t1, t1, t1, F det = determinant(t1, t1, t1,
t1, t1, t1, t1, t1, t1,
t1, t1, t1); // Full det t1, t1, t1); // Full det
double err = det.error(); double err = det.error();

View File

@ -64,7 +64,7 @@ public:
double rqx = rx-qx; double rqx = rx-qx;
double rqy = ry-qy; double rqy = ry-qy;
double det = det2x2_by_formula(qpx*tpy - qpy*tpx, tpx*tqx + tpy*tqy, double det = determinant(qpx*tpy - qpy*tpx, tpx*tqx + tpy*tqy,
qpx*rpy - qpy*rpx, rpx*rqx + rpy*rqy); qpx*rpy - qpy*rpx, rpx*rqx + rpy*rqy);
// We compute the semi-static bound. // We compute the semi-static bound.
@ -106,7 +106,7 @@ public:
F t1 = F(1, F::ulp()/2); // First translation F t1 = F(1, F::ulp()/2); // First translation
F a = t1*t1 - t1*t1; F a = t1*t1 - t1*t1;
F b = t1*t1 + t1*t1; F b = t1*t1 + t1*t1;
F det = det2x2_by_formula(a, b, a, b); F det = determinant(a, b, a, b);
double err = det.error(); double err = det.error();
err += err * 3 * F::ulp(); // Correction due to "eps * maxx * maxy...". err += err * 3 * F::ulp(); // Correction due to "eps * maxx * maxy...".

View File

@ -104,7 +104,7 @@ public:
double eps = 1.2466136531027298e-13 * maxx * maxy * maxz double eps = 1.2466136531027298e-13 * maxx * maxy * maxz
* (maxz * maxz); * (maxz * maxz);
double det = det4x4_by_formula(ptx,pty,ptz,pt2, double det = determinant(ptx,pty,ptz,pt2,
rtx,rty,rtz,rt2, rtx,rty,rtz,rt2,
qtx,qty,qtz,qt2, qtx,qty,qtz,qt2,
stx,sty,stz,st2); stx,sty,stz,st2);
@ -131,7 +131,7 @@ public:
typedef CGAL::Static_filter_error F; typedef CGAL::Static_filter_error F;
F t1 = F(1,F::ulp()/2); // First translation F t1 = F(1,F::ulp()/2); // First translation
F sq = t1*t1+t1*t1+t1*t1; // squares F sq = t1*t1+t1*t1+t1*t1; // squares
F det = det4x4_by_formula(t1, t1, t1, sq, F det = determinant(t1, t1, t1, sq,
t1, t1, t1, sq, t1, t1, t1, sq,
t1, t1, t1, sq, t1, t1, t1, sq,
t1, t1, t1, sq); // Full det t1, t1, t1, sq); // Full det

View File

@ -441,58 +441,58 @@ Aff_transformation_repH3<R>::inverse() const
typedef typename R::RT RT; typedef typename R::RT RT;
const RT RT0(0); const RT RT0(0);
return Aff_transformation_3( return Aff_transformation_3(
det3x3_by_formula( t11, t12, t13, determinant( t11, t12, t13,
t21, t22, t23, // i 00 t21, t22, t23, // i 00
RT0, RT0, t33 ), RT0, RT0, t33 ),
- det3x3_by_formula( t01, t02, t03, - determinant( t01, t02, t03,
t21, t22, t23, // i 01 t21, t22, t23, // i 01
RT0, RT0, t33 ), RT0, RT0, t33 ),
det3x3_by_formula( t01, t02, t03, determinant( t01, t02, t03,
t11, t12, t13, // i 02 t11, t12, t13, // i 02
RT0, RT0, t33 ), RT0, RT0, t33 ),
- det3x3_by_formula( t01, t02, t03, - determinant( t01, t02, t03,
t11, t12, t13, // i 03 t11, t12, t13, // i 03
t21, t22, t23 ), t21, t22, t23 ),
- det3x3_by_formula( t10, t12, t13, - determinant( t10, t12, t13,
t20, t22, t23, // i 10 t20, t22, t23, // i 10
RT0, RT0, t33 ), RT0, RT0, t33 ),
det3x3_by_formula( t00, t02, t03, determinant( t00, t02, t03,
t20, t22, t23, // i 11 t20, t22, t23, // i 11
RT0, RT0, t33 ), RT0, RT0, t33 ),
- det3x3_by_formula( t00, t02, t03, - determinant( t00, t02, t03,
t10, t12, t13, // i 12 t10, t12, t13, // i 12
RT0, RT0, t33 ), RT0, RT0, t33 ),
det3x3_by_formula( t00, t02, t03, determinant( t00, t02, t03,
t10, t12, t13, // i 13 t10, t12, t13, // i 13
t20, t22, t23 ), t20, t22, t23 ),
det3x3_by_formula( t10, t11, t13, determinant( t10, t11, t13,
t20, t21, t23, // i 20 t20, t21, t23, // i 20
RT0, RT0, t33 ), RT0, RT0, t33 ),
- det3x3_by_formula( t00, t01, t03, - determinant( t00, t01, t03,
t20, t21, t23, // i 21 t20, t21, t23, // i 21
RT0, RT0, t33 ), RT0, RT0, t33 ),
det3x3_by_formula( t00, t01, t03, determinant( t00, t01, t03,
t10, t11, t13, // i 22 t10, t11, t13, // i 22
RT0, RT0, t33 ), RT0, RT0, t33 ),
- det3x3_by_formula( t00, t01, t03, - determinant( t00, t01, t03,
t10, t11, t13, // i 23 t10, t11, t13, // i 23
t20, t21, t23 ), t20, t21, t23 ),
det3x3_by_formula( t00, t01, t02, determinant( t00, t01, t02,
t10, t11, t12, // i 33 t10, t11, t12, // i 33
t20, t21, t22 ) t20, t21, t22 )
) ; ) ;
@ -523,7 +523,7 @@ bool
Aff_transformation_repH3<R>::is_even() const Aff_transformation_repH3<R>::is_even() const
{ {
return (CGAL_NTS sign<RT>( t33 * return (CGAL_NTS sign<RT>( t33 *
det3x3_by_formula(t00, t01, t02, determinant(t00, t01, t02,
t10, t11, t12, t10, t11, t12,
t20, t21, t22 ) ) == POSITIVE ); t20, t21, t22 ) ) == POSITIVE );
} }

View File

@ -495,7 +495,7 @@ PlaneH3<R>::transform_to_2d() const
RT t32 = -( e1phx*e2phz - e1phz*e2phx ); RT t32 = -( e1phx*e2phz - e1phz*e2phx );
RT t33 = ( e1phx*e2phy - e1phy*e2phx ); RT t33 = ( e1phx*e2phy - e1phy*e2phx );
RT scale = det3x3_by_formula( orthohx, orthohy, orthohz, RT scale = determinant( orthohx, orthohy, orthohz,
e1phx, e1phy, e1phz, e1phx, e1phy, e1phz,
e2phx, e2phy, e2phz ); e2phx, e2phy, e2phz );

View File

@ -60,16 +60,16 @@ gp_linear_intersection(const PlaneH3<R> &f,
{ {
typedef typename R::RT RT; typedef typename R::RT RT;
return typename R::Point_3( return typename R::Point_3(
det3x3_by_formula<RT>(-f.d(), f.b(), f.c(), determinant<RT>(-f.d(), f.b(), f.c(),
-g.d(), g.b(), g.c(), -g.d(), g.b(), g.c(),
-h.d(), h.b(), h.c()), -h.d(), h.b(), h.c()),
det3x3_by_formula<RT>( f.a(),-f.d(), f.c(), determinant<RT>( f.a(),-f.d(), f.c(),
g.a(),-g.d(), g.c(), g.a(),-g.d(), g.c(),
h.a(),-h.d(), h.c()), h.a(),-h.d(), h.c()),
det3x3_by_formula<RT>( f.a(), f.b(),-f.d(), determinant<RT>( f.a(), f.b(),-f.d(),
g.a(), g.b(),-g.d(), g.a(), g.b(),-g.d(),
h.a(), h.b(),-h.d()), h.a(), h.b(),-h.d()),
det3x3_by_formula<RT>( f.a(), f.b(), f.c(), determinant<RT>( f.a(), f.b(), f.c(),
g.a(), g.b(), g.c(), g.a(), g.b(), g.c(),
h.a(), h.b(), h.c())); h.a(), h.b(), h.c()));
} }

View File

@ -178,16 +178,16 @@ namespace HomogeneousKernelFunctors {
const RT & vpy = vp.hy(); const RT & vpy = vp.hy();
const RT & vpz = vp.hz(); const RT & vpz = vp.hz();
RT alpha = det3x3_by_formula( vpx, v2x, v3x, RT alpha = determinant( vpx, v2x, v3x,
vpy, v2y, v3y, vpy, v2y, v3y,
vpz, v2z, v3z ); vpz, v2z, v3z );
RT beta = det3x3_by_formula( v1x, vpx, v3x, RT beta = determinant( v1x, vpx, v3x,
v1y, vpy, v3y, v1y, vpy, v3y,
v1z, vpz, v3z ); v1z, vpz, v3z );
RT gamma = det3x3_by_formula( v1x, v2x, vpx, RT gamma = determinant( v1x, v2x, vpx,
v1y, v2y, vpy, v1y, v2y, vpy,
v1z, v2z, vpz ); v1z, v2z, vpz );
RT det = det3x3_by_formula( v1x, v2x, v3x, RT det = determinant( v1x, v2x, v3x,
v1y, v2y, v3y, v1y, v2y, v3y,
v1z, v2z, v3z ); v1z, v2z, v3z );
@ -1277,7 +1277,7 @@ namespace HomogeneousKernelFunctors {
result_type result_type
operator()(const Vector_2& v, const Vector_2& w) const operator()(const Vector_2& v, const Vector_2& w) const
{ {
return det2x2_by_formula(v.hx(), v.hy(), return determinant(v.hx(), v.hy(),
w.hx(), w.hy()) / FT(v.hw() * w.hw()); w.hx(), w.hy()) / FT(v.hw() * w.hw());
} }
}; };
@ -1294,7 +1294,7 @@ namespace HomogeneousKernelFunctors {
result_type result_type
operator()(const Vector_3& v, const Vector_3& w, const Vector_3& t) const operator()(const Vector_3& v, const Vector_3& w, const Vector_3& t) const
{ {
return det3x3_by_formula(v.hx(), v.hy(), v.hz(), return determinant(v.hx(), v.hy(), v.hz(),
w.hx(), w.hy(), w.hz(), w.hx(), w.hy(), w.hz(),
t.hx(), t.hy(), t.hz()) t.hx(), t.hy(), t.hz())
/ FT(v.hw() * w.hw() * t.hw()); / FT(v.hw() * w.hw() * t.hw());
@ -2385,19 +2385,19 @@ namespace HomogeneousKernelFunctors {
shz *= shw; shz *= shw;
shw *= shw; shw *= shw;
RT chx = det4x4_by_formula(phy, phz, pssq, phw, RT chx = determinant(phy, phz, pssq, phw,
qhy, qhz, qssq, qhw, qhy, qhz, qssq, qhw,
rhy, rhz, rssq, rhw, rhy, rhz, rssq, rhw,
shy, shz, sssq, shw ); shy, shz, sssq, shw );
RT chy = det4x4_by_formula(phx, phz, pssq, phw, RT chy = determinant(phx, phz, pssq, phw,
qhx, qhz, qssq, qhw, qhx, qhz, qssq, qhw,
rhx, rhz, rssq, rhw, rhx, rhz, rssq, rhw,
shx, shz, sssq, shw ); shx, shz, sssq, shw );
RT chz = det4x4_by_formula(phx, phy, pssq, phw, RT chz = determinant(phx, phy, pssq, phw,
qhx, qhy, qssq, qhw, qhx, qhy, qssq, qhw,
rhx, rhy, rssq, rhw, rhx, rhy, rssq, rhw,
shx, shy, sssq, shw ); shx, shy, sssq, shw );
RT chw = det4x4_by_formula(phx, phy, phz, phw, RT chw = determinant(phx, phy, phz, phw,
qhx, qhy, qhz, qhw, qhx, qhy, qhz, qhw,
rhx, rhy, rhz, rhw, rhx, rhy, rhz, rhw,
shx, shy, shz, shw ); shx, shy, shz, shw );
@ -4657,7 +4657,7 @@ namespace HomogeneousKernelFunctors {
const RT & thw = t.hw(); const RT & thw = t.hw();
const RT thw2 = thw*thw; const RT thw2 = thw*thw;
const RT det = det5x5_by_formula<RT>( const RT det = determinant<RT>(
phx*phw, phy*phw, phz*phw, phx*phx + phy*phy + phz*phz, phw2, phx*phw, phy*phw, phz*phw, phx*phx + phy*phy + phz*phz, phw2,
qhx*qhw, qhy*qhw, qhz*qhw, qhx*qhx + qhy*qhy + qhz*qhz, qhw2, qhx*qhw, qhy*qhw, qhz*qhw, qhx*qhx + qhy*qhy + qhz*qhz, qhw2,
rhx*rhw, rhy*rhw, rhz*rhw, rhx*rhx + rhy*rhy + rhz*rhz, rhw2, rhx*rhw, rhy*rhw, rhz*rhw, rhx*rhx + rhy*rhy + rhz*rhz, rhw2,

View File

@ -34,7 +34,7 @@ plane_centered_circumcenter_translateC3(const RT &ax, const RT &ay,
const RT &rz, const RT &rz,
RT &x, RT &y, RT &z) RT &x, RT &y, RT &z)
{ {
RT den = RT(2) * det3x3_by_formula(nx,qx,rx, RT den = RT(2) * determinant(nx,qx,rx,
ny,qy,ry, ny,qy,ry,
nz,qz,rz); nz,qz,rz);
// The 3 points aren't collinear. // The 3 points aren't collinear.
@ -48,15 +48,15 @@ plane_centered_circumcenter_translateC3(const RT &ax, const RT &ay,
RT na = nx*ax + ny*ay + nz*az; RT na = nx*ax + ny*ay + nz*az;
na *= RT(2.0); na *= RT(2.0);
x = det3x3_by_formula(ny,nz,na, x = determinant(ny,nz,na,
qy,qz,q2, qy,qz,q2,
ry,rz,r2)/ den ; ry,rz,r2)/ den ;
y = - det3x3_by_formula(nx,nz,na, y = - determinant(nx,nz,na,
qx,qz,q2, qx,qz,q2,
rx,rz,r2)/ den ; rx,rz,r2)/ den ;
z = det3x3_by_formula(nx,ny,na, z = determinant(nx,ny,na,
qx,qy,q2, qx,qy,q2,
rx,ry,r2)/ den ; rx,ry,r2)/ den ;
} }
@ -106,18 +106,18 @@ bisector_plane_intersection_translateC3(const RT &ax, const RT &ay,
// the line is defined by p1 and p2 with // the line is defined by p1 and p2 with
//=> p1: z1 =0, p2: z2=1 //=> p1: z1 =0, p2: z2=1
// precondition: (nx!=0 || ny!=0) && (qx!=0 && qy!=0) && den!=0 // precondition: (nx!=0 || ny!=0) && (qx!=0 && qy!=0) && den!=0
// where RT den = RT(2.0) * det2x2_by_formula(qx,qy,nx, ny); // where RT den = RT(2.0) * determinant(qx,qy,nx, ny);
RT q2 = CGAL_NTS square(qx) + CGAL_NTS square(qy) RT q2 = CGAL_NTS square(qx) + CGAL_NTS square(qy)
+ CGAL_NTS square(qz); + CGAL_NTS square(qz);
RT na = nx*ax + ny*ay + nz*az; RT na = nx*ax + ny*ay + nz*az;
na *= RT(2.0); na *= RT(2.0);
x1 = det2x2_by_formula(ny, na, qy, q2); x1 = determinant(ny, na, qy, q2);
y1 = - det2x2_by_formula(nx, na, qx, q2); y1 = - determinant(nx, na, qx, q2);
x2 = x1 + RT(2.0) * det2x2_by_formula(qy,qz,ny, nz); x2 = x1 + RT(2.0) * determinant(qy,qz,ny, nz);
y2 = y1 - RT(2.0) * det2x2_by_formula(qx,qz,nx, nz); y2 = y1 - RT(2.0) * determinant(qx,qz,nx, nz);
x1 /= den; x1 /= den;
x2 /= den; x2 /= den;
@ -199,7 +199,7 @@ bisector_plane_intersectionC3(const RT &ax, const RT &ay, const RT &az,
// 2) the projection of n and (p-q) onto the plane is not // 2) the projection of n and (p-q) onto the plane is not
// identical // identical
// computation for (z=0) with adequate permutations // computation for (z=0) with adequate permutations
RT den = RT(2.0) * det2x2_by_formula(qx-px,qy-py,nx, ny); RT den = RT(2.0) * determinant(qx-px,qy-py,nx, ny);
if ((nx!=0 || ny!=0) && (qx!=px || qy!=py) && den!=RT(0)) if ((nx!=0 || ny!=0) && (qx!=px || qy!=py) && den!=RT(0))
//den==0 <=> projections of (qx,qy) and (nx,ny) are identical //den==0 <=> projections of (qx,qy) and (nx,ny) are identical
//intersection with z=0/z=1 //intersection with z=0/z=1
@ -207,14 +207,14 @@ bisector_plane_intersectionC3(const RT &ax, const RT &ay, const RT &az,
qx,qy,qz,den, qx,qy,qz,den,
x1,y1,z1,x2,y2,z2); x1,y1,z1,x2,y2,z2);
else{ else{
den = RT(2.0) * det2x2_by_formula(qy-py,qz-pz,ny,nz); den = RT(2.0) * determinant(qy-py,qz-pz,ny,nz);
if ((ny!=0 || nz!=0) && (qy!=py || qz!=pz) && den!=RT(0)) if ((ny!=0 || nz!=0) && (qy!=py || qz!=pz) && den!=RT(0))
//intersection with x=0/x=1 => permutations //intersection with x=0/x=1 => permutations
bisector_plane_intersection_permuteC3(ay,az,ax,ny,nz,nx,py,pz,px, bisector_plane_intersection_permuteC3(ay,az,ax,ny,nz,nx,py,pz,px,
qy,qz,qx,den, qy,qz,qx,den,
y1,z1,x1,y2,z2,x2); y1,z1,x1,y2,z2,x2);
else{ else{
den = RT(2.0) * det2x2_by_formula(qz-pz,qx-px,nz,nx); den = RT(2.0) * determinant(qz-pz,qx-px,nz,nx);
CGAL_assertion((nx!=0 || nz!=0) && (qx!=px || qz!=pz) && den!=RT(0)); CGAL_assertion((nx!=0 || nz!=0) && (qx!=px || qz!=pz) && den!=RT(0));
//intersection with y=0/y=1 => permutations //intersection with y=0/y=1 => permutations
bisector_plane_intersection_permuteC3(az,ax,ay,nz,nx,ny,pz,px,py, bisector_plane_intersection_permuteC3(az,ax,ay,nz,nx,ny,pz,px,py,

View File

@ -156,7 +156,7 @@ struct wcross_tag_2<Homogeneous_tag>
const Point_2 &q, const Point_2 &q,
const Point_2 &r) const const Point_2 &r) const
{ {
return det3x3_by_formula(p.hx(), q.hx(), r.hx(), return determinant(p.hx(), q.hx(), r.hx(),
p.hy(), q.hy(), r.hy(), p.hy(), q.hy(), r.hy(),
p.hw(), q.hw(), r.hw()); p.hw(), q.hw(), r.hw());
} }

View File

@ -30,7 +30,7 @@ CGAL_BEGIN_NAMESPACE
template <class RT> template <class RT>
inline inline
RT RT
det2x2_by_formula( determinant(
const RT& a00, const RT& a01, const RT& a00, const RT& a01,
const RT& a10, const RT& a11) const RT& a10, const RT& a11)
{ {
@ -42,7 +42,7 @@ det2x2_by_formula(
template <class RT> template <class RT>
CGAL_KERNEL_MEDIUM_INLINE CGAL_KERNEL_MEDIUM_INLINE
RT RT
det3x3_by_formula( determinant(
const RT& a00, const RT& a01, const RT& a02, const RT& a00, const RT& a01, const RT& a02,
const RT& a10, const RT& a11, const RT& a12, const RT& a10, const RT& a11, const RT& a12,
const RT& a20, const RT& a21, const RT& a22) const RT& a20, const RT& a21, const RT& a22)
@ -59,7 +59,7 @@ det3x3_by_formula(
template <class RT> template <class RT>
CGAL_KERNEL_LARGE_INLINE CGAL_KERNEL_LARGE_INLINE
RT RT
det4x4_by_formula( determinant(
const RT& a00, const RT& a01, const RT& a02, const RT& a03, 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& a10, const RT& a11, const RT& a12, const RT& a13,
const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a20, const RT& a21, const RT& a22, const RT& a23,
@ -85,7 +85,7 @@ det4x4_by_formula(
template <class RT> template <class RT>
CGAL_KERNEL_LARGE_INLINE CGAL_KERNEL_LARGE_INLINE
RT RT
det5x5_by_formula( determinant(
const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04, 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& 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, const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a24,
@ -127,7 +127,7 @@ det5x5_by_formula(
template <class RT> template <class RT>
RT RT
det6x6_by_formula( determinant(
const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04, const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04,
const RT& a05, const RT& a05,
const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14,

View File

@ -45,7 +45,7 @@ sign_of_determinant( const RT& a00, const RT& a01, const RT& a02,
const RT& a10, const RT& a11, const RT& a12, const RT& a10, const RT& a11, const RT& a12,
const RT& a20, const RT& a21, const RT& a22) const RT& a20, const RT& a21, const RT& a22)
{ {
return CGAL_NTS sign(det3x3_by_formula(a00, a01, a02, return CGAL_NTS sign(determinant(a00, a01, a02,
a10, a11, a12, a10, a11, a12,
a20, a21, a22)); a20, a21, a22));
} }
@ -59,7 +59,7 @@ sign_of_determinant(
const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a20, const RT& a21, const RT& a22, const RT& a23,
const RT& a30, const RT& a31, const RT& a32, const RT& a33) const RT& a30, const RT& a31, const RT& a32, const RT& a33)
{ {
return CGAL_NTS sign(det4x4_by_formula(a00, a01, a02, a03, return CGAL_NTS sign(determinant(a00, a01, a02, a03,
a10, a11, a12, a13, a10, a11, a12, a13,
a20, a21, a22, a23, a20, a21, a22, a23,
a30, a31, a32, a33)); a30, a31, a32, a33));
@ -75,7 +75,7 @@ sign_of_determinant(
const RT& a30, const RT& a31, const RT& a32, const RT& a33, const RT& a34, const RT& a30, const RT& a31, const RT& a32, const RT& a33, const RT& a34,
const RT& a40, const RT& a41, const RT& a42, const RT& a43, const RT& a44) const RT& a40, const RT& a41, const RT& a42, const RT& a43, const RT& a44)
{ {
return CGAL_NTS sign(det5x5_by_formula(a00, a01, a02, a03, a04, return CGAL_NTS sign(determinant(a00, a01, a02, a03, a04,
a10, a11, a12, a13, a14, a10, a11, a12, a13, a14,
a20, a21, a22, a23, a24, a20, a21, a22, a23, a24,
a30, a31, a32, a33, a34, a30, a31, a32, a33, a34,
@ -99,7 +99,7 @@ sign_of_determinant(
const RT& a50, const RT& a51, const RT& a52, const RT& a53, const RT& a54, const RT& a50, const RT& a51, const RT& a52, const RT& a53, const RT& a54,
const RT& a55) const RT& a55)
{ {
return CGAL_NTS sign(det6x6_by_formula(a00, a01, a02, a03, a04, a05, return CGAL_NTS sign(determinant(a00, a01, a02, a03, a04, a05,
a10, a11, a12, a13, a14, a15, a10, a11, a12, a13, a14, a15,
a20, a21, a22, a23, a24, a25, a20, a21, a22, a23, a24, a25,
a30, a31, a32, a33, a34, a35, a30, a31, a32, a33, a34, a35,

View File

@ -2086,7 +2086,7 @@ Version 1.106 (09 February 2004) [rursu]
- authors for determinant.h updated - authors for determinant.h updated
1.2.8 -> 1.2.9 1.2.8 -> 1.2.9
- det4x4_by_formula improved as suggested by Sylvain and Olivier - determinant improved as suggested by Sylvain and Olivier
1.2.7 -> 1.2.8 1.2.7 -> 1.2.8
- #define CGAL_KERNEL_INLINE inline added again - #define CGAL_KERNEL_INLINE inline added again

View File

@ -33,54 +33,54 @@ _test_fct_determinant(const NT&)
NT one = NT(1); NT one = NT(1);
NT two = NT(2); NT two = NT(2);
// detDxD_by_formula // determinant()
assert( CGAL::det2x2_by_formula<NT>( zero, one, \ assert( CGAL::determinant<NT>( zero, one, \
one, zero) == - one ); one, zero) == - one );
assert( CGAL::det2x2_by_formula<NT>( one, one, \ assert( CGAL::determinant<NT>( one, one, \
zero, -one) == - one ); zero, -one) == - one );
assert( CGAL::det3x3_by_formula<NT>( one, zero, one, \ assert( CGAL::determinant<NT>( one, zero, one, \
zero, one, one, \ zero, one, one, \
-one, -one, zero ) == \ -one, -one, zero ) == \
one * CGAL::det2x2_by_formula<NT>( one, one, \ one * CGAL::determinant<NT>( one, one, \
-one, zero ) \ -one, zero ) \
- one * CGAL::det2x2_by_formula<NT>( zero, one, \ - one * CGAL::determinant<NT>( zero, one, \
one, one ) ); one, one ) );
assert( CGAL::det4x4_by_formula<NT>( one, zero, one, -one, \ assert( CGAL::determinant<NT>( one, zero, one, -one, \
zero, one, one, -one, \ zero, one, one, -one, \
one, two, zero, one, \ one, two, zero, one, \
-one, -one, zero, zero ) == \ -one, -one, zero, zero ) == \
one * CGAL::det3x3_by_formula<NT>( zero, one, -one, \ one * CGAL::determinant<NT>( zero, one, -one, \
one, one, -one, \ one, one, -one, \
two, zero, one ) \ two, zero, one ) \
- one * CGAL::det3x3_by_formula<NT>( one, one, -one, \ - one * CGAL::determinant<NT>( one, one, -one, \
zero, one, -one, \ zero, one, -one, \
one, zero, one ) ); one, zero, one ) );
assert( CGAL::det5x5_by_formula<NT>( one, zero, one, -one, zero, \ assert( CGAL::determinant<NT>( one, zero, one, -one, zero, \
zero, one, one, -one, zero, \ zero, one, one, -one, zero, \
one, two, zero, one, two, \ one, two, zero, one, two, \
one, one, zero, -one, zero, \ one, one, zero, -one, zero, \
-one, -one, zero, zero, one ) == \ -one, -one, zero, zero, one ) == \
two * CGAL::det4x4_by_formula<NT>( one, zero, one, -one, \ two * CGAL::determinant<NT>( one, zero, one, -one, \
zero, one, one, -one, \ zero, one, one, -one, \
one, one, zero, -one, \ one, one, zero, -one, \
-one, -one, zero, zero) \ -one, -one, zero, zero) \
+ one * CGAL::det4x4_by_formula<NT>( one, zero, one, -one, \ + one * CGAL::determinant<NT>( one, zero, one, -one, \
zero, one, one, -one, \ zero, one, one, -one, \
one, two, zero, one, \ one, two, zero, one, \
one, one, zero, -one) ); one, one, zero, -one) );
assert( CGAL::det6x6_by_formula<NT>( one, zero, zero, zero, zero, zero, \ assert( CGAL::determinant<NT>( one, zero, zero, zero, zero, zero, \
zero, one, zero, one, -one, zero, \ zero, one, zero, one, -one, zero, \
zero, zero, one, one, -one, zero, \ zero, zero, one, one, -one, zero, \
zero, one, two, zero, one, two, \ zero, one, two, zero, one, two, \
zero, one, one, zero, -one, zero, \ zero, one, one, zero, -one, zero, \
zero, -one, -one, zero, zero, one ) == \ zero, -one, -one, zero, zero, one ) == \
CGAL::det5x5_by_formula<NT>( one, zero, one, -one, zero, \ CGAL::determinant<NT>( one, zero, one, -one, zero, \
zero, one, one, -one, zero, \ zero, one, one, -one, zero, \
one, two, zero, one, two, \ one, two, zero, one, two, \
one, one, zero, -one, zero, \ one, one, zero, -one, zero, \

View File

@ -145,7 +145,7 @@ CNT incircle(CNT ax, CNT ay, CNT bx, CNT by,
CNT rpy = cy - ay; CNT rpy = cy - ay;
CNT tpx = dx - ax; CNT tpx = dx - ax;
CNT tpy = dy - ay; CNT tpy = dy - ay;
CNT det=CGAL::det2x2_by_formula(qpx*tpy - qpy*tpx, tpx*(dx - bx) CNT det=CGAL::determinant(qpx*tpy - qpy*tpx, tpx*(dx - bx)
+ tpy*(dy - by), + tpy*(dy - by),
qpx*rpy - qpy*rpx, rpx*(cx - bx) qpx*rpy - qpy*rpx, rpx*(cx - bx)
+ rpy*(cy - by)); + rpy*(cy - by));

View File

@ -1015,7 +1015,7 @@ public:
CNT rpy = cy; CNT rpy = cy;
CNT tpx = dx; CNT tpx = dx;
CNT tpy = dy; CNT tpy = dy;
CNT det=CGAL::det2x2_by_formula(qpx*tpy - qpy*tpx, CNT det=CGAL::determinant(qpx*tpy - qpy*tpx,
tpx*(dx - bx) + tpy*(dy - by), tpx*(dx - bx) + tpy*(dy - by),
qpx*rpy - qpy*rpx, qpx*rpy - qpy*rpx,
rpx*(cx - bx) + rpy*(cy - by)); rpx*(cx - bx) + rpy*(cy - by));
@ -1032,7 +1032,7 @@ public:
CNT rpy = cy - ay; CNT rpy = cy - ay;
CNT tpx = dx - ax; CNT tpx = dx - ax;
CNT tpy = dy - ay; CNT tpy = dy - ay;
CNT det=CGAL::det2x2_by_formula(qpx*tpy - qpy*tpx, CNT det=CGAL::determinant(qpx*tpy - qpy*tpx,
tpx*(dx - bx) + tpy*(dy - by), tpx*(dx - bx) + tpy*(dy - by),
qpx*rpy - qpy*rpx, qpx*rpy - qpy*rpx,
rpx*(cx - bx) + rpy*(cy - by)); rpx*(cx - bx) + rpy*(cy - by));

View File

@ -64,7 +64,7 @@ struct Cartesian_side_of_oriented_sphere_3
FT dsy = (d.y()) - (e.y()); FT dsy = (d.y()) - (e.y());
FT dsz = (d.z()) - (e.z()); FT dsz = (d.z()) - (e.z());
FT dst = dsx*dsx + dsy*dsy + dsz*dsz; FT dst = dsx*dsx + dsy*dsy + dsz*dsz;
FT ret= CGAL::det4x4_by_formula(dpx, dpy, dpz, dpt, FT ret= CGAL::determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst); dsx, dsy, dsz, dst);
@ -127,7 +127,7 @@ struct Cartesian_power_test_3
FT dst = dsx*dsx + dsy*dsy FT dst = dsx*dsx + dsy*dsy
+ dsz*dsz - (d.weight()) + (e.weight()); + dsz*dsz - (d.weight()) + (e.weight());
return ::CGAL::det4x4_by_formula(dpx, dpy, dpz, dpt, return ::CGAL::determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst); dsx, dsy, dsz, dst);
@ -192,7 +192,7 @@ struct Cartesian_lifted_power_test_3
FT dsz = (d.point().z()) - (e.point().z()); FT dsz = (d.point().z()) - (e.point().z());
FT dst = (d.lifted()) - (e.lifted()); FT dst = (d.lifted()) - (e.lifted());
return CGAL::det4x4_by_formula(dpx, dpy, dpz, dpt, return CGAL::determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst); dsx, dsy, dsz, dst);
@ -244,7 +244,7 @@ struct Cartesian_linear_lifted_power_test_3
FT dsz = (d.point().z()) - (e.point().z()); FT dsz = (d.point().z()) - (e.point().z());
FT dst = (d.lifted()) - (e.lifted()); FT dst = (d.lifted()) - (e.lifted());
safe_ret = CGAL::det4x4_by_formula(dpx, dpy, dpz, dpt, safe_ret = CGAL::determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst); dsx, dsy, dsz, dst);
@ -354,7 +354,7 @@ typename Pt::Coordinate co3(const Pt &a, const Pt &b, const Pt &c, const Pt &d)
RT a20= qz-pz; RT a20= qz-pz;
RT a21= rz-pz; RT a21= rz-pz;
RT a22= sz-pz; RT a22= sz-pz;
RT ret= CGAL::det3x3_by_formula(a00, a01, a02, RT ret= CGAL::determinant(a00, a01, a02,
a10, a11, a12, a10, a11, a12,
a20, a21, a22); a20, a21, a22);
/*CGAL_LOG_MAPLE(std::endl << std::endl); /*CGAL_LOG_MAPLE(std::endl << std::endl);
@ -554,7 +554,7 @@ typename CC::result_type co3(const Pt &a, const Pt &b, const Pt &c, const Pt &d,
RT a20= qz-pz; RT a20= qz-pz;
RT a21= rz-pz; RT a21= rz-pz;
RT a22= sz-pz; RT a22= sz-pz;
RT ret= CGAL::det3x3_by_formula(a00, a01, a02, RT ret= CGAL::determinant(a00, a01, a02,
a10, a11, a12, a10, a11, a12,
a20, a21, a22); a20, a21, a22);
CGAL::Kinetic::log()->stream(CGAL::KDS::Log::MAPLE) << std::endl << std::endl; CGAL::Kinetic::log()->stream(CGAL::KDS::Log::MAPLE) << std::endl << std::endl;
@ -600,7 +600,7 @@ typename CC::result_type pt3(const Pt &a, const Pt &b, const Pt &c, const Pt &d,
FT dst = dsx*dsx + dsy*dsy FT dst = dsx*dsx + dsy*dsy
+ dsz*dsz - cc(d.weight()) + cc(e.weight()); + dsz*dsz - cc(d.weight()) + cc(e.weight());
return CGAL::det4x4_by_formula(dpx, dpy, dpz, dpt, return CGAL::determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst); dsx, dsy, dsz, dst);
@ -633,7 +633,7 @@ typename CC::result_type pt3(const Cartesian_moving_point_3<C> &a,
FT dsy = cc(d.y()) - cc(e.y()); FT dsy = cc(d.y()) - cc(e.y());
FT dsz = cc(d.z()) - cc(e.z()); FT dsz = cc(d.z()) - cc(e.z());
FT dst = dsx*dsx + dsy*dsy + dsz*dsz; FT dst = dsx*dsx + dsy*dsy + dsz*dsz;
FT ret= CGAL::det4x4_by_formula(dpx, dpy, dpz, dpt, FT ret= CGAL::determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst); dsx, dsy, dsz, dst);
@ -728,7 +728,7 @@ typename CC::result_type pt3(Cartesian_moving_lifted_point_3<CGAL::Polynomial::L
ret= m0123; ret= m0123;
} }
if (flip) ret=-ret; if (flip) ret=-ret;
/*FT ret = CGAL::det4x4_by_formula(dpx, dpy, dpz, dpt, /*FT ret = CGAL::determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst);*/ dsx, dsy, dsz, dst);*/
@ -788,7 +788,7 @@ typename CC::result_type pt3(Cartesian_moving_lifted_point_3<C> a,
FT dsz = cc(d.point().z()) - cc(e.point().z()); FT dsz = cc(d.point().z()) - cc(e.point().z());
FT dst = cc(d.lifted()) - cc(e.lifted()); FT dst = cc(d.lifted()) - cc(e.lifted());
FT ret = CGAL::det4x4_by_formula(dpx, dpy, dpz, dpt, FT ret = CGAL::determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst); dsx, dsy, dsz, dst);

View File

@ -61,7 +61,7 @@ private:
x4 = s2.target().x(), x4 = s2.target().x(),
y4 = s2.target().y(); y4 = s2.target().y();
FT det = det2x2_by_formula(x2 - x1, x4 - x3, FT det = determinant(x2 - x1, x4 - x3,
y2 - y1, y4 - y3); y2 - y1, y4 - y3);
return ( CGAL::sign(det) == CGAL::ZERO ); return ( CGAL::sign(det) == CGAL::ZERO );

View File

@ -79,7 +79,7 @@ private:
const RT& x3, const RT& y3, const RT& x3, const RT& y3,
const RT& x4, const RT& y4) const const RT& x4, const RT& y4) const
{ {
RT delta = -det2x2_by_formula(x2 - x1, x4 - x3, y2 - y1, y4 - y3); RT delta = -determinant(x2 - x1, x4 - x3, y2 - y1, y4 - y3);
Sign s = CGAL::sign( delta ); Sign s = CGAL::sign( delta );
if ( s != CGAL::ZERO ) { if ( s != CGAL::ZERO ) {
@ -94,8 +94,8 @@ private:
const RT& x3, const RT& y3, const RT& x4, const RT& y4, const RT& x3, const RT& y3, const RT& x4, const RT& y4,
const RT& D) const const RT& D) const
{ {
RT Dt = -det2x2_by_formula(x3 - x1, x4 - x3, y3 - y1, y4 - y3); RT Dt = -determinant(x3 - x1, x4 - x3, y3 - y1, y4 - y3);
RT Ds = det2x2_by_formula(x2 - x1, x3 - x1, y2 - y1, y3 - y1); RT Ds = determinant(x2 - x1, x3 - x1, y2 - y1, y3 - y1);
Sign s_D = CGAL::sign( D ); Sign s_D = CGAL::sign( D );
Sign s_Dt = CGAL::sign( Dt ); Sign s_Dt = CGAL::sign( Dt );
@ -164,7 +164,7 @@ private:
parallel_C2(const RT& x1, const RT& y1, const RT& x2, const RT& y2, parallel_C2(const RT& x1, const RT& y1, const RT& x2, const RT& y2,
const RT& x3, const RT& y3, const RT& x4, const RT& y4) const const RT& x3, const RT& y3, const RT& x4, const RT& y4) const
{ {
RT D1 = det2x2_by_formula(x2 - x1, x3 - x1, y2 - y1, y3 - y1); RT D1 = determinant(x2 - x1, x3 - x1, y2 - y1, y3 - y1);
if ( CGAL::sign( D1 ) != CGAL::ZERO ) { if ( CGAL::sign( D1 ) != CGAL::ZERO ) {
return Enum::DISJOINT; return Enum::DISJOINT;

View File

@ -284,8 +284,8 @@ protected:
RT x3 = p3.x(), y3 = p3.y(); RT x3 = p3.x(), y3 = p3.y();
RT x4 = p4.x(), y4 = p4.y(); RT x4 = p4.x(), y4 = p4.y();
RT D = det2x2_by_formula(x2 - x1, x4 - x3, y2 - y1, y4 - y3); RT D = determinant(x2 - x1, x4 - x3, y2 - y1, y4 - y3);
RT Dt = det2x2_by_formula(x3 - x1, x4 - x3, y3 - y1, y4 - y3); RT Dt = determinant(x3 - x1, x4 - x3, y3 - y1, y4 - y3);
RT t = Dt / D; RT t = Dt / D;

View File

@ -145,7 +145,7 @@ public:
RT determinant() const RT determinant() const
{ {
return det3x3_by_formula(r0().x(),r0().y(),r0().z() return determinant(r0().x(),r0().y(),r0().z()
,r1().x(),r1().y(),r1().z() ,r1().x(),r1().y(),r1().z()
,r2().x(),r2().y(),r2().z() ,r2().x(),r2().y(),r2().z()
); );
@ -189,17 +189,17 @@ MatrixC33<R> cofactors_matrix ( MatrixC33<R> const& m )
{ {
typedef typename R::RT RT ; typedef typename R::RT RT ;
RT c00 = det2x2_by_formula(m.r1().y(),m.r1().z(),m.r2().y(),m.r2().z()); RT c00 = determinant(m.r1().y(),m.r1().z(),m.r2().y(),m.r2().z());
RT c01 = -det2x2_by_formula(m.r1().x(),m.r1().z(),m.r2().x(),m.r2().z()); RT c01 = -determinant(m.r1().x(),m.r1().z(),m.r2().x(),m.r2().z());
RT c02 = det2x2_by_formula(m.r1().x(),m.r1().y(),m.r2().x(),m.r2().y()); RT c02 = determinant(m.r1().x(),m.r1().y(),m.r2().x(),m.r2().y());
RT c10 = -det2x2_by_formula(m.r0().y(),m.r0().z(),m.r2().y(),m.r2().z()); RT c10 = -determinant(m.r0().y(),m.r0().z(),m.r2().y(),m.r2().z());
RT c11 = det2x2_by_formula(m.r0().x(),m.r0().z(),m.r2().x(),m.r2().z()); RT c11 = determinant(m.r0().x(),m.r0().z(),m.r2().x(),m.r2().z());
RT c12 = -det2x2_by_formula(m.r0().x(),m.r0().y(),m.r2().x(),m.r2().y()); RT c12 = -determinant(m.r0().x(),m.r0().y(),m.r2().x(),m.r2().y());
RT c20 = det2x2_by_formula(m.r0().y(),m.r0().z(),m.r1().y(),m.r1().z()); RT c20 = determinant(m.r0().y(),m.r0().z(),m.r1().y(),m.r1().z());
RT c21 = -det2x2_by_formula(m.r0().x(),m.r0().z(),m.r1().x(),m.r1().z()); RT c21 = -determinant(m.r0().x(),m.r0().z(),m.r1().x(),m.r1().z());
RT c22 = det2x2_by_formula(m.r0().x(),m.r0().y(),m.r1().x(),m.r1().y()); RT c22 = determinant(m.r0().x(),m.r0().y(),m.r1().x(),m.r1().y());
return MatrixC33<R>(c00,c01,c02 return MatrixC33<R>(c00,c01,c02
,c10,c11,c12 ,c10,c11,c12

View File

@ -39,7 +39,7 @@ weighted_circumcenter_translateC2(const RT &dqx, const RT &dqy, const RT &dqw,
RT r2 = CGAL_NTS square(drx) + CGAL_NTS square(dry) - drw; RT r2 = CGAL_NTS square(drx) + CGAL_NTS square(dry) - drw;
RT q2 = CGAL_NTS square(dqx) + CGAL_NTS square(dqy) - dqw; RT q2 = CGAL_NTS square(dqx) + CGAL_NTS square(dqy) - dqw;
RT den = RT(2) * det2x2_by_formula(dqx, dqy, drx, dry); RT den = RT(2) * determinant(dqx, dqy, drx, dry);
// The 3 points aren't collinear. // The 3 points aren't collinear.
// Hopefully, this is already checked at the upper level. // Hopefully, this is already checked at the upper level.
@ -47,8 +47,8 @@ weighted_circumcenter_translateC2(const RT &dqx, const RT &dqy, const RT &dqw,
// One possible optimization here is to precompute 1/den, to avoid one // One possible optimization here is to precompute 1/den, to avoid one
// division. However, we loose precision, and it's maybe not worth it (?). // division. However, we loose precision, and it's maybe not worth it (?).
dcx = det2x2_by_formula (dry, dqy, r2, q2) / den; dcx = determinant (dry, dqy, r2, q2) / den;
dcy = - det2x2_by_formula (drx, dqx, r2, q2) / den; dcy = - determinant (drx, dqx, r2, q2) / den;
} }
//template < class RT > //template < class RT >

View File

@ -222,7 +222,7 @@ public:
RT RT0(0); RT RT0(0);
RT RT1(1); RT RT1(1);
RT det = CGAL::det4x4_by_formula(px, py, px*px + py*py, RT1, RT det = CGAL::determinant(px, py, px*px + py*py, RT1,
qx, qy, qx*qx + qy*qy, RT1, qx, qy, qx*qx + qy*qy, RT1,
rx, ry, rx*rx + ry*ry, RT1, rx, ry, rx*rx + ry*ry, RT1,
tx, ty, tx*tx + ty*ty, RT1); tx, ty, tx*tx + ty*ty, RT1);

View File

@ -50,16 +50,16 @@ determinants_for_weighted_circumcenterC3(
FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) + FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) +
CGAL_NTS square(spz) - sw + pw; CGAL_NTS square(spz) - sw + pw;
num_x = det3x3_by_formula(qpy,qpz,qp2, num_x = determinant(qpy,qpz,qp2,
rpy,rpz,rp2, rpy,rpz,rp2,
spy,spz,sp2); spy,spz,sp2);
num_y = det3x3_by_formula(qpx,qpz,qp2, num_y = determinant(qpx,qpz,qp2,
rpx,rpz,rp2, rpx,rpz,rp2,
spx,spz,sp2); spx,spz,sp2);
num_z = det3x3_by_formula(qpx,qpy,qp2, num_z = determinant(qpx,qpy,qp2,
rpx,rpy,rp2, rpx,rpy,rp2,
spx,spy,sp2); spx,spy,sp2);
den = det3x3_by_formula(qpx,qpy,qpz, den = determinant(qpx,qpy,qpz,
rpx,rpy,rpz, rpx,rpy,rpz,
spx,spy,spz); spx,spy,spz);
} }
@ -182,26 +182,26 @@ determinants_for_weighted_circumcenterC3(
// The following determinants can be developped and simplified. // The following determinants can be developped and simplified.
// //
// FT num_x = det3x3_by_formula(qpy,qpz,qp2, // FT num_x = determinant(qpy,qpz,qp2,
// rpy,rpz,rp2, // rpy,rpz,rp2,
// sy,sz,FT(0)); // sy,sz,FT(0));
// FT num_y = det3x3_by_formula(qpx,qpz,qp2, // FT num_y = determinant(qpx,qpz,qp2,
// rpx,rpz,rp2, // rpx,rpz,rp2,
// sx,sz,FT(0)); // sx,sz,FT(0));
// FT num_z = det3x3_by_formula(qpx,qpy,qp2, // FT num_z = determinant(qpx,qpy,qp2,
// rpx,rpy,rp2, // rpx,rpy,rp2,
// sx,sy,FT(0)); // sx,sy,FT(0));
num_x = qp2 * det2x2_by_formula(rpy,rpz,sy,sz) num_x = qp2 * determinant(rpy,rpz,sy,sz)
- rp2 * det2x2_by_formula(qpy,qpz,sy,sz); - rp2 * determinant(qpy,qpz,sy,sz);
num_y = qp2 * det2x2_by_formula(rpx,rpz,sx,sz) num_y = qp2 * determinant(rpx,rpz,sx,sz)
- rp2 * det2x2_by_formula(qpx,qpz,sx,sz); - rp2 * determinant(qpx,qpz,sx,sz);
num_z = qp2 * det2x2_by_formula(rpx,rpy,sx,sy) num_z = qp2 * determinant(rpx,rpy,sx,sy)
- rp2 * det2x2_by_formula(qpx,qpy,sx,sy); - rp2 * determinant(qpx,qpy,sx,sy);
den = det3x3_by_formula(qpx,qpy,qpz, den = determinant(qpx,qpy,qpz,
rpx,rpy,rpz, rpx,rpy,rpz,
sx,sy,sz); sx,sy,sz);
} }
@ -383,9 +383,9 @@ radical_axisC3(const RT &px, const RT &py, const RT &pz, const We &pw,
//il manque des tests... //il manque des tests...
a= RT(1)*det2x2_by_formula(dqy, dqz, dry, drz); a= RT(1)*determinant(dqy, dqz, dry, drz);
b= - RT(1)*det2x2_by_formula(dqx, dqz, drx, drz); b= - RT(1)*determinant(dqx, dqz, drx, drz);
c= RT(1)*det2x2_by_formula(dqx, dqy, drx, dry); c= RT(1)*determinant(dqx, dqy, drx, dry);
} }
// function used in critical_squared_radiusC3 // function used in critical_squared_radiusC3
@ -423,7 +423,7 @@ power_to_orthogonal_sphereC3(
FT dst = CGAL_NTS square(dsx) + CGAL_NTS square(dsy) + FT dst = CGAL_NTS square(dsx) + CGAL_NTS square(dsy) +
CGAL_NTS square(dsz) - sw + tw; CGAL_NTS square(dsz) - sw + tw;
return det4x4_by_formula(dpx, dpy, dpz, dpt, return determinant(dpx, dpy, dpz, dpt,
dqx, dqy, dqz, dqt, dqx, dqy, dqz, dqt,
drx, dry, drz, drt, drx, dry, drz, drt,
dsx, dsy, dsz, dst); dsx, dsy, dsz, dst);

View File

@ -72,11 +72,11 @@ in_smallest_orthogonal_sphereC3(
FT qpw = qq - qw + pw ; FT qpw = qq - qw + pw ;
FT rpw = rr - rw + pw ; FT rpw = rr - rw + pw ;
FT den = det2x2_by_formula(qq,qr, FT den = determinant(qq,qr,
qr,rr); qr,rr);
FT detq = det2x2_by_formula(qpw,qr, FT detq = determinant(qpw,qr,
rpw,rr); rpw,rr);
FT detr = det2x2_by_formula(qq,qpw, FT detr = determinant(qq,qpw,
qr,rpw); qr,rpw);
// Smallest smallest orthogonal sphere center // Smallest smallest orthogonal sphere center
@ -159,16 +159,16 @@ does_simplex_intersect_weighted_dual_supportC3(
FT rpw = rr - rw + pw ; FT rpw = rr - rw + pw ;
FT spw = ss - sw + pw ; FT spw = ss - sw + pw ;
FT den = det3x3_by_formula(qq,qr,qs, FT den = determinant(qq,qr,qs,
qr,rr,rs, qr,rr,rs,
qs,rs,ss); qs,rs,ss);
FT detq = det3x3_by_formula(qpw,qr,qs, FT detq = determinant(qpw,qr,qs,
rpw,rr,rs, rpw,rr,rs,
spw,rs,ss); spw,rs,ss);
FT detr = det3x3_by_formula(qq,qpw,qs, FT detr = determinant(qq,qpw,qs,
qr,rpw,rs, qr,rpw,rs,
qs,spw,ss); qs,spw,ss);
FT dets = det3x3_by_formula(qq,qr,qpw, FT dets = determinant(qq,qr,qpw,
qr,rr,rpw, qr,rr,rpw,
qs,rs,spw); qs,rs,spw);
CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) ); CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) );
@ -222,11 +222,11 @@ does_simplex_intersect_weighted_dual_supportC3(
FT qpw = qq - qw + pw ; FT qpw = qq - qw + pw ;
FT rpw = rr - rw + pw ; FT rpw = rr - rw + pw ;
FT den = det2x2_by_formula(qq,qr, FT den = determinant(qq,qr,
qr,rr); qr,rr);
FT detq = det2x2_by_formula(qpw,qr, FT detq = determinant(qpw,qr,
rpw,rr); rpw,rr);
FT detr = det2x2_by_formula(qq,qpw, FT detr = determinant(qq,qpw,
qr,rpw); qr,rpw);
CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) ); CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) );