Triangulation: Add static filter for 5D and 6D orientation predicate (#8862)

## Summary of Changes

This PR adds a static filter for the orientation test of 4D, 5D and 6D
points. It is ~20% faster than just interval arithmetic.

- [x] Add for 4D
- [x] ~~Add in sphere predicate~~

## Release Management

* Affected package(s): Triangulation
* License and copyright ownership:  unchanged
This commit is contained in:
Sebastien Loriot 2025-08-05 16:15:54 +02:00 committed by GitHub
commit 833d425ca3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 2970 additions and 21 deletions

View File

@ -0,0 +1,221 @@
// Copyright (c) 2025 GeometryFactory (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri
#ifndef CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_4_H
#define CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_4_H
#include <CGAL/Profile_counter.h>
#include <CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h>
#include <CGAL/determinant.h>
#include <cmath>
namespace CGAL { namespace internal { namespace Static_filters_predicates {
template < typename K_base >
class Orientation_4
: public K_base::Orientation_4
{
typedef typename K_base::Orientation Orientation;
typedef typename K_base::Point_4 Point_4;
typedef typename K_base::Orientation_4 Base;
public:
using Base::operator();
Orientation
operator()(const Point_4 &p, const Point_4 &q,
const Point_4 &r, const Point_4 &s,
const Point_4 &t) const
{
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Orientation_4", tmp);
double p0, p1, p2, p3, q0, q1, q2, q3, r0, r1, r2, r3, s0, s1, s2, s3, t0, t1, t2, t3;
if (fit_in_double(p.c0(), p0) && fit_in_double(p.c1(), p1) &&
fit_in_double(p.c2(), p2) && fit_in_double(p.c3(), p3) &&
fit_in_double(q.c0(), q0) && fit_in_double(q.c1(), q1) &&
fit_in_double(q.c2(), q2) && fit_in_double(q.c3(), q3) &&
fit_in_double(r.c0(), r0) && fit_in_double(r.c1(), r1) &&
fit_in_double(r.c2(), r2) && fit_in_double(r.c3(), r3) &&
fit_in_double(s.c0(), s0) && fit_in_double(s.c1(), s1) &&
fit_in_double(s.c2(), s2) && fit_in_double(s.c3(), s3) &&
fit_in_double(t.c0(), t0) && fit_in_double(t.c1(), t1) &&
fit_in_double(t.c2(), t2) && fit_in_double(t.c3(), t3) )
{
CGAL_assertion_code(Orientation should_be = Base::operator()(p, q, r, s, t));
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double det;
det = ::CGAL::determinant( m01, m02, m03, m04, m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34 );
double eps;
double max1 = CGAL::abs(m01);
double am = CGAL::abs(m02);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m03);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m11);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m12);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m13);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m23);
if( (max1 < am) ) { max1 = am; }
double max2 = CGAL::abs(m01);
am = CGAL::abs(m02);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m11);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m12);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m21);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m22);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m23);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m33);
if( (max2 < am) ) { max2 = am; }
double max3 = CGAL::abs(m04);
am = CGAL::abs(m14);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m24);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m34);
if( (max3 < am) ) { max3 = am; }
double max4 = CGAL::abs(m11);
am = CGAL::abs(m12);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m21);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m22);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m31);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m32);
if( (max4 < am) ) { max4 = am; }
double lower_bound_1;
double upper_bound_1;
lower_bound_1 = max1;
upper_bound_1 = max1;
if( (max2 < lower_bound_1) )
{
lower_bound_1 = max2;
}
else
{
if( (max2 > upper_bound_1) )
{
upper_bound_1 = max2;
}
}
if( (max3 < lower_bound_1) )
{
lower_bound_1 = max3;
}
else
{
if( (max3 > upper_bound_1) )
{
upper_bound_1 = max3;
}
}
if( (max4 < lower_bound_1) )
{
lower_bound_1 = max4;
}
else
{
if( (max4 > upper_bound_1) )
{
upper_bound_1 = max4;
}
}
if( (lower_bound_1 < 2.89273249588395272840e-74) )
{
return Base::operator()(p, q, r, s, t);
}
else
{
if( (upper_bound_1 > 7.23700557733225900010e+75) )
{
return Base::operator()(p, q, r, s, t);
}
eps = (3.17768858673611327578e-14 * (((max4 * max2) * max1) * max3));
if( (det > eps) )
{
CGAL_assertion(should_be == POSITIVE);
return POSITIVE;
}
else
{
if( (det < -eps) )
{
CGAL_assertion(should_be == NEGATIVE);
return NEGATIVE;
}
else
{
return Base::operator()(p, q, r, s, t);
}
}
}
}
return Base::operator()(p, q, r, s, t);
}
};
} } } // namespace CGAL::internal::Static_filters_predicates
#endif // CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_4_H

View File

@ -0,0 +1,289 @@
// Copyright (c) 2025 GeometryFactory (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri
#ifndef CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_5_H
#define CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_5_H
#include <CGAL/Profile_counter.h>
#include <CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h>
#include <CGAL/determinant.h>
#include <cmath>
namespace CGAL { namespace internal { namespace Static_filters_predicates {
template < typename K_base >
class Orientation_5
: public K_base::Orientation_5
{
typedef typename K_base::Orientation Orientation;
typedef typename K_base::Point_5 Point_5;
typedef typename K_base::Orientation_5 Base;
public:
using Base::operator();
Orientation
operator()(const Point_5 &p, const Point_5 &q,
const Point_5 &r, const Point_5 &s,
const Point_5 &t, const Point_5 &u) const
{
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Orientation_5", tmp);
double p0, p1, p2, p3, p4, q0, q1, q2, q3, q4, r0, r1, r2, r3, r4, s0, s1, s2, s3, s4, t0, t1, t2, t3, t4, u0, u1, u2, u3, u4;
if (fit_in_double(p.c0(), p0) && fit_in_double(p.c1(), p1) &&
fit_in_double(p.c2(), p2) && fit_in_double(p.c3(), p3) &&
fit_in_double(p.c4(), p4) &&
fit_in_double(q.c0(), q0) && fit_in_double(q.c1(), q1) &&
fit_in_double(q.c2(), q2) && fit_in_double(q.c3(), q3) &&
fit_in_double(q.c4(), q4) &&
fit_in_double(r.c0(), r0) && fit_in_double(r.c1(), r1) &&
fit_in_double(r.c2(), r2) && fit_in_double(r.c3(), r3) &&
fit_in_double(r.c4(), r4) &&
fit_in_double(s.c0(), s0) && fit_in_double(s.c1(), s1) &&
fit_in_double(s.c2(), s2) && fit_in_double(s.c3(), s3) &&
fit_in_double(s.c4(), s4) &&
fit_in_double(t.c0(), t0) && fit_in_double(t.c1(), t1) &&
fit_in_double(t.c2(), t2) && fit_in_double(t.c3(), t3) &&
fit_in_double(t.c4(), t4) &&
fit_in_double(u.c0(), u0) && fit_in_double(u.c1(), u1) &&
fit_in_double(u.c2(), u2) && fit_in_double(u.c3(), u3) &&
fit_in_double(u.c4(), u4))
{
CGAL_assertion_code(Orientation should_be = Base::operator()(p, q, r, s, t, u));
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m05;
m05 = (u0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m15;
m15 = (u1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m25;
m25 = (u2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double m35;
m35 = (u3 - p3);
double m41;
m41 = (q4 - p4);
double m42;
m42 = (r4 - p4);
double m43;
m43 = (s4 - p4);
double m44;
m44 = (t4 - p4);
double m45;
m45 = (u4 - p4);
double det;
det = ::CGAL::determinant( m01, m02, m03, m04, m05, m11, m12, m13, m14, m15, m21, m22, m23, m24, m25, m31, m32, m33, m34, m35, m41, m42, m43, m44, m45 );
double eps;
double max1 = CGAL::abs(m01);
double am = CGAL::abs(m02);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m03);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m11);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m12);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m13);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m21);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m22);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m23);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m33);
if( (max1 < am) ) { max1 = am; }
double max2 = CGAL::abs(m01);
am = CGAL::abs(m02);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m11);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m12);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m21);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m22);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m23);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m31);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m32);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m33);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m43);
if( (max2 < am) ) { max2 = am; }
double max3 = CGAL::abs(m04);
am = CGAL::abs(m14);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m24);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m34);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m44);
if( (max3 < am) ) { max3 = am; }
double max4 = CGAL::abs(m05);
am = CGAL::abs(m15);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m25);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m35);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m45);
if( (max4 < am) ) { max4 = am; }
double max5 = CGAL::abs(m11);
am = CGAL::abs(m12);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m21);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m22);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m31);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m32);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m41);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m42);
if( (max5 < am) ) { max5 = am; }
double lower_bound_1;
double upper_bound_1;
lower_bound_1 = max5;
upper_bound_1 = max5;
if( (max1 < lower_bound_1) )
{
lower_bound_1 = max1;
}
else
{
if( (max1 > upper_bound_1) )
{
upper_bound_1 = max1;
}
}
if( (max2 < lower_bound_1) )
{
lower_bound_1 = max2;
}
else
{
if( (max2 > upper_bound_1) )
{
upper_bound_1 = max2;
}
}
if( (max3 < lower_bound_1) )
{
lower_bound_1 = max3;
}
else
{
if( (max3 > upper_bound_1) )
{
upper_bound_1 = max3;
}
}
if( (max4 < lower_bound_1) )
{
lower_bound_1 = max4;
}
else
{
if( (max4 > upper_bound_1) )
{
upper_bound_1 = max4;
}
}
if( (lower_bound_1 < 9.99657131447050328602e-60) )
{
return Base::operator()(p, q, r, s, t, u);
}
else
{
if( (upper_bound_1 > 3.21387608851797912384e+60) )
{
return Base::operator()(p, q, r, s, t, u);
}
eps = (2.22889232457534740153e-13 * ((((max5 * max2) * max1) * max3) * max4));
if( (det > eps) )
{
CGAL_assertion(should_be == POSITIVE);
return POSITIVE;
}
else
{
if( (det < -eps) )
{
CGAL_assertion(should_be == NEGATIVE);
return NEGATIVE;
}
else
{
return Base::operator()(p, q, r, s, t, u);
}
}
}
}
return Base::operator()(p, q, r, s, t, u);
}
};
} } } // namespace CGAL::internal::Static_filters_predicates
#endif // CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_5_H

View File

@ -0,0 +1,358 @@
// Copyright (c) 2025 GeometryFactory (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri
#ifndef CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_6_H
#define CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_6_H
#include <CGAL/Profile_counter.h>
#include <CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h>
#include <CGAL/determinant.h>
#include <cmath>
namespace CGAL { namespace internal { namespace Static_filters_predicates {
template < typename K_base >
class Orientation_6
: public K_base::Orientation_6
{
typedef typename K_base::Orientation Orientation;
typedef typename K_base::Point_6 Point_6;
typedef typename K_base::Orientation_6 Base;
public:
using Base::operator();
Orientation
operator()(const Point_6 &p, const Point_6 &q,
const Point_6 &r, const Point_6 &s,
const Point_6 &t, const Point_6 &u, const Point_6 &v) const
{
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Orientation_6", tmp);
double p0, p1, p2, p3, p4, p5, q0, q1, q2, q3, q4, q5, r0, r1, r2, r3, r4, r5, s0, s1, s2, s3, s4, s5, t0, t1, t2, t3, t4, t5, u0, u1, u2, u3, u4, u5, v0, v1, v2, v3, v4, v5;
if (fit_in_double(p.c0(), p0) && fit_in_double(p.c1(), p1) &&
fit_in_double(p.c2(), p2) && fit_in_double(p.c3(), p3) &&
fit_in_double(p.c4(), p4) && fit_in_double(p.c5(), p5) &&
fit_in_double(q.c0(), q0) && fit_in_double(q.c1(), q1) &&
fit_in_double(q.c2(), q2) && fit_in_double(q.c3(), q3) &&
fit_in_double(q.c4(), q4) && fit_in_double(q.c5(), q5) &&
fit_in_double(r.c0(), r0) && fit_in_double(r.c1(), r1) &&
fit_in_double(r.c2(), r2) && fit_in_double(r.c3(), r3) &&
fit_in_double(r.c4(), r4) && fit_in_double(r.c5(), r5) &&
fit_in_double(s.c0(), s0) && fit_in_double(s.c1(), s1) &&
fit_in_double(s.c2(), s2) && fit_in_double(s.c3(), s3) &&
fit_in_double(s.c4(), s4) && fit_in_double(s.c5(), s5) &&
fit_in_double(t.c0(), t0) && fit_in_double(t.c1(), t1) &&
fit_in_double(t.c2(), t2) && fit_in_double(t.c3(), t3) &&
fit_in_double(t.c4(), t4) && fit_in_double(t.c5(), t5) &&
fit_in_double(u.c0(), u0) && fit_in_double(u.c1(), u1) &&
fit_in_double(u.c2(), u2) && fit_in_double(u.c3(), u3) &&
fit_in_double(u.c4(), u4) && fit_in_double(u.c5(), u5) &&
fit_in_double(v.c0(), v0) && fit_in_double(v.c1(), v1) &&
fit_in_double(v.c2(), v2) && fit_in_double(v.c3(), v3) &&
fit_in_double(v.c4(), v4) && fit_in_double(v.c5(), v5))
{
CGAL_assertion_code(Orientation should_be = Base::operator()(p, q, r, s, t, u, v));
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m05;
m05 = (u0 - p0);
double m06;
m06 = (v0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m15;
m15 = (u1 - p1);
double m16;
m16 = (v1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m25;
m25 = (u2 - p2);
double m26;
m26 = (v2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double m35;
m35 = (u3 - p3);
double m36;
m36 = (v3 - p3);
double m41;
m41 = (q4 - p4);
double m42;
m42 = (r4 - p4);
double m43;
m43 = (s4 - p4);
double m44;
m44 = (t4 - p4);
double m45;
m45 = (u4 - p4);
double m46;
m46 = (v4 - p4);
double m51;
m51 = (q5 - p5);
double m52;
m52 = (r5 - p5);
double m53;
m53 = (s5 - p5);
double m54;
m54 = (t5 - p5);
double m55;
m55 = (u5 - p5);
double m56;
m56 = (v5 - p5);
double det;
det = ::CGAL::determinant( m01, m02, m03, m04, m05, m06, m11, m12, m13, m14, m15, m16, m21, m22, m23, m24, m25, m26, m31, m32, m33, m34, m35, m36, m41, m42, m43, m44, m45, m46, m51, m52, m53, m54, m55, m56 );
double eps;
double max1 = CGAL::abs(m01);
double am = CGAL::abs(m02);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m11);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m12);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m21);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m22);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m31);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m32);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m41);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m42);
if( (max1 < am) ) { max1 = am; }
double max2 = CGAL::abs(m03);
am = CGAL::abs(m11);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m12);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m13);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m21);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m22);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m23);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m31);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m32);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m33);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m41);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m42);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m43);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m51);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m52);
if( (max2 < am) ) { max2 = am; }
double max3 = CGAL::abs(m04);
am = CGAL::abs(m14);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m24);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m34);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m44);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m54);
if( (max3 < am) ) { max3 = am; }
double max4 = CGAL::abs(m05);
am = CGAL::abs(m15);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m25);
if( (max4 < am) ) { max3 = am; }
am = CGAL::abs(m35);
if( (max4 < am) ) { max4= am; }
am = CGAL::abs(m45);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m55);
if( (max4 < am) ) { max4 = am; }
double max5 = CGAL::abs(m06);
am = CGAL::abs(m16);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m26);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m36);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m46);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m56);
if( (max5 < am) ) { max5 = am; }
double max6 = CGAL::abs(m13);
am = CGAL::abs(m21);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m22);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m23);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m31);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m32);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m33);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m41);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m42);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m43);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m51);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m52);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m53);
am = CGAL::abs(m53);
if( (max6 < am) ) { max6 = am; }
double lower_bound_1;
double upper_bound_1;
lower_bound_1 = max6;
upper_bound_1 = max6;
if( (max5 < lower_bound_1) )
{
lower_bound_1 = max5;
}
else
{
if( (max5 > upper_bound_1) )
{
upper_bound_1 = max5;
}
}
if( (max1 < lower_bound_1) )
{
lower_bound_1 = max1;
}
else
{
if( (max1 > upper_bound_1) )
{
upper_bound_1 = max1;
}
}
if( (max2 < lower_bound_1) )
{
lower_bound_1 = max2;
}
else
{
if( (max2 > upper_bound_1) )
{
upper_bound_1 = max2;
}
}
if( (max3 < lower_bound_1) )
{
lower_bound_1 = max3;
}
else
{
if( (max3 > upper_bound_1) )
{
upper_bound_1 = max3;
}
}
if( (max4 < lower_bound_1) )
{
lower_bound_1 = max4;
}
else
{
if( (max4 > upper_bound_1) )
{
upper_bound_1 = max4;
}
}
if( (lower_bound_1 < 4.82472686053427214432e-50) )
{
return Base::operator()(p, q, r, s, t, u, v);
}
else
{
if( (upper_bound_1 > 1.87072209578355511223e+50) )
{
return Base::operator()(p, q, r, s, t, u, v);
}
eps = (1.76403842114300859158e-12 * (((((max1 * max2) * max6) * max3) * max4) * max5));
if( (det > eps) )
{
CGAL_assertion(should_be == POSITIVE);
return POSITIVE;
}
else
{
if( (det < -eps) )
{
CGAL_assertion(should_be == NEGATIVE);
return NEGATIVE;
}
}
}
}
return Base::operator()(p, q, r, s, t, u, v);
}
};
} } } // namespace CGAL::internal::Static_filters_predicates
#endif // CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_6_H

View File

@ -18,6 +18,9 @@
#include <CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_circle_2.h>
#include <CGAL/Filtered_kernel/internal/Static_filters/Orientation_3.h>
#include <CGAL/Filtered_kernel/internal/Static_filters/Side_of_oriented_sphere_3.h>
#include <CGAL/Filtered_kernel/internal/Static_filters/Orientation_4.h>
#include <CGAL/Filtered_kernel/internal/Static_filters/Orientation_5.h>
#include <CGAL/Filtered_kernel/internal/Static_filters/Orientation_6.h>
namespace CGAL {
namespace SFA { // static filter adapter
@ -151,6 +154,150 @@ template <class Base_,class R_> struct Side_of_oriented_sphere_3 : private Store
return typename internal::Static_filters_predicates::Side_of_oriented_sphere_3<Adapter>()(P(this->kernel(),c,A),P(this->kernel(),c,B),P(this->kernel(),c,C),P(this->kernel(),c,D),P(this->kernel(),c,E));
}
};
template <class Base_,class R_> struct Adapter_4 {
typedef typename Get_type<R_, Orientation_tag>::type Orientation;
typedef typename Get_type<R_, Oriented_side_tag>::type Oriented_side;
typedef typename Get_type<R_, Point_tag>::type Point;
typedef typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type CC;
typedef typename Get_functor<Base_, Orientation_of_points_tag>::type Orientation_base;
struct Point_4 {
R_ const&r; CC const&c; Point const& p;
Point_4(R_ const&r_, CC const&c_, Point const&p_):r(r_),c(c_),p(p_){}
decltype(auto) c0()const{return c(p,0);}
decltype(auto) c1()const{return c(p,1);}
decltype(auto) c2()const{return c(p,2);}
decltype(auto) c3()const{return c(p,3);}
};
struct Orientation_4 {
typedef typename Get_type<R_, Orientation_tag>::type result_type;
auto operator()(Point_4 const&A, Point_4 const&B, Point_4 const&C,
Point_4 const&D, Point_4 const&E)const{
Point const* t[6]={&A.p,&B.p,&C.p,&D.p,&E.p};
return Orientation_base(A.r)(make_transforming_iterator<Dereference_functor>(t+0),make_transforming_iterator<Dereference_functor>(t+5));
}
};
};
template <class Base_,class R_> struct Orientation_of_points_4 : private Store_kernel<R_> {
CGAL_FUNCTOR_INIT_STORE(Orientation_of_points_4)
typedef typename Get_type<R_, Point_tag>::type Point;
typedef typename Get_type<R_, Orientation_tag>::type result_type;
typedef typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type CC;
typedef Adapter_4<Base_, R_> Adapter;
template<class Iter> result_type operator()(Iter f, Iter CGAL_assertion_code(e))const{
CC c(this->kernel());
Point const& A=*f;
Point const& B=*++f;
Point const& C=*++f;
Point const& D=*++f;
Point const& E=*++f;
CGAL_assertion(++f==e);
typedef typename Adapter::Point_4 P;
return typename internal::Static_filters_predicates::Orientation_4<Adapter>()(P(this->kernel(),c,A),P(this->kernel(),c,B),P(this->kernel(),c,C),
P(this->kernel(),c,D),P(this->kernel(),c,E));
}
};
template <class Base_,class R_> struct Adapter_5 {
typedef typename Get_type<R_, Orientation_tag>::type Orientation;
typedef typename Get_type<R_, Oriented_side_tag>::type Oriented_side;
typedef typename Get_type<R_, Point_tag>::type Point;
typedef typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type CC;
typedef typename Get_functor<Base_, Orientation_of_points_tag>::type Orientation_base;
struct Point_5 {
R_ const&r; CC const&c; Point const& p;
Point_5(R_ const&r_, CC const&c_, Point const&p_):r(r_),c(c_),p(p_){}
decltype(auto) c0()const{return c(p,0);}
decltype(auto) c1()const{return c(p,1);}
decltype(auto) c2()const{return c(p,2);}
decltype(auto) c3()const{return c(p,3);}
decltype(auto) c4()const{return c(p,4);}
};
struct Orientation_5 {
typedef typename Get_type<R_, Orientation_tag>::type result_type;
auto operator()(Point_5 const&A, Point_5 const&B, Point_5 const&C,
Point_5 const&D, Point_5 const&E, Point_5 const&F)const{
Point const* t[6]={&A.p,&B.p,&C.p,&D.p,&E.p,&F.p};
return Orientation_base(A.r)(make_transforming_iterator<Dereference_functor>(t+0),make_transforming_iterator<Dereference_functor>(t+6));
}
};
};
template <class Base_,class R_> struct Orientation_of_points_5 : private Store_kernel<R_> {
CGAL_FUNCTOR_INIT_STORE(Orientation_of_points_5)
typedef typename Get_type<R_, Point_tag>::type Point;
typedef typename Get_type<R_, Orientation_tag>::type result_type;
typedef typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type CC;
typedef Adapter_5<Base_, R_> Adapter;
template<class Iter> result_type operator()(Iter f, Iter CGAL_assertion_code(e))const{
CC c(this->kernel());
Point const& A=*f;
Point const& B=*++f;
Point const& C=*++f;
Point const& D=*++f;
Point const& E=*++f;
Point const& F=*++f;
CGAL_assertion(++f==e);
typedef typename Adapter::Point_5 P;
return typename internal::Static_filters_predicates::Orientation_5<Adapter>()(P(this->kernel(),c,A),P(this->kernel(),c,B),P(this->kernel(),c,C),
P(this->kernel(),c,D),P(this->kernel(),c,E),P(this->kernel(),c,F));
}
};
template <class Base_,class R_> struct Adapter_6 {
typedef typename Get_type<R_, Orientation_tag>::type Orientation;
typedef typename Get_type<R_, Oriented_side_tag>::type Oriented_side;
typedef typename Get_type<R_, Point_tag>::type Point;
typedef typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type CC;
typedef typename Get_functor<Base_, Orientation_of_points_tag>::type Orientation_base;
struct Point_6 {
R_ const&r; CC const&c; Point const& p;
Point_6(R_ const&r_, CC const&c_, Point const&p_):r(r_),c(c_),p(p_){}
decltype(auto) c0()const{return c(p,0);}
decltype(auto) c1()const{return c(p,1);}
decltype(auto) c2()const{return c(p,2);}
decltype(auto) c3()const{return c(p,3);}
decltype(auto) c4()const{return c(p,4);}
decltype(auto) c5()const{return c(p,5);}
};
struct Orientation_6 {
typedef typename Get_type<R_, Orientation_tag>::type result_type;
auto operator()(Point_6 const&A, Point_6 const&B, Point_6 const&C,
Point_6 const&D, Point_6 const&E, Point_6 const&F, Point_6 const&G)const{
Point const* t[7]={&A.p,&B.p,&C.p,&D.p,&E.p,&F.p,&G.p};
return Orientation_base(A.r)(make_transforming_iterator<Dereference_functor>(t+0),make_transforming_iterator<Dereference_functor>(t+7));
}
};
};
template <class Base_,class R_> struct Orientation_of_points_6 : private Store_kernel<R_> {
CGAL_FUNCTOR_INIT_STORE(Orientation_of_points_6)
typedef typename Get_type<R_, Point_tag>::type Point;
typedef typename Get_type<R_, Orientation_tag>::type result_type;
typedef typename Get_functor<R_, Compute_point_cartesian_coordinate_tag>::type CC;
typedef Adapter_6<Base_, R_> Adapter;
template<class Iter> result_type operator()(Iter f, Iter CGAL_assertion_code(e))const{
CC c(this->kernel());
Point const& A=*f;
Point const& B=*++f;
Point const& C=*++f;
Point const& D=*++f;
Point const& E=*++f;
Point const& F=*++f;
Point const& G=*++f;
CGAL_assertion(++f==e);
typedef typename Adapter::Point_6 P;
return typename internal::Static_filters_predicates::Orientation_6<Adapter>()(P(this->kernel(),c,A),P(this->kernel(),c,B),P(this->kernel(),c,C),
P(this->kernel(),c,D),P(this->kernel(),c,E),P(this->kernel(),c,F),
P(this->kernel(),c,G));
}
};
} // namespace SFA
template <class Dim_ /* should be implicit */, class R_, class Derived_=Default>
@ -194,5 +341,44 @@ struct Cartesian_static_filters<Dimension_tag<3>, R_, Derived_> : public R_ {
typedef SFA::Side_of_oriented_sphere_3<R_,Derived> type;
};
};
#ifndef CGAL_NO_STATIC_FILTER_456
template <class R_, class Derived_>
struct Cartesian_static_filters<Dimension_tag<4>, R_, Derived_> : public R_ {
constexpr Cartesian_static_filters(){}
constexpr Cartesian_static_filters(int d):R_(d){}
typedef Cartesian_static_filters<Dimension_tag<4>, R_, Derived_> Self;
typedef typename Default::Get<Derived_,Self>::type Derived;
template <class T, class=void> struct Functor : Inherit_functor<R_, T> {};
template <class D> struct Functor <Orientation_of_points_tag,D> {
typedef SFA::Orientation_of_points_4<R_,Derived> type;
};
};
template <class R_, class Derived_>
struct Cartesian_static_filters<Dimension_tag<5>, R_, Derived_> : public R_ {
constexpr Cartesian_static_filters(){}
constexpr Cartesian_static_filters(int d):R_(d){}
typedef Cartesian_static_filters<Dimension_tag<5>, R_, Derived_> Self;
typedef typename Default::Get<Derived_,Self>::type Derived;
template <class T, class=void> struct Functor : Inherit_functor<R_, T> {};
template <class D> struct Functor <Orientation_of_points_tag,D> {
typedef SFA::Orientation_of_points_5<R_,Derived> type;
};
};
template <class R_, class Derived_>
struct Cartesian_static_filters<Dimension_tag<6>, R_, Derived_> : public R_ {
constexpr Cartesian_static_filters(){}
constexpr Cartesian_static_filters(int d):R_(d){}
typedef Cartesian_static_filters<Dimension_tag<6>, R_, Derived_> Self;
typedef typename Default::Get<Derived_,Self>::type Derived;
template <class T, class=void> struct Functor : Inherit_functor<R_, T> {};
template <class D> struct Functor <Orientation_of_points_tag,D> {
typedef SFA::Orientation_of_points_6<R_,Derived> type;
};
};
#endif
} // namespace CGAL
#endif

View File

@ -0,0 +1,254 @@
// Copyright (c) 2025
// INRIA Saclay-Ile de France (France)
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Andreas Fabri
// Files needed as input for the static filter generator
#if 0
double determinant(
double a00, double a01, double a02, double a03,
double a10, double a11, double a12, double a13,
double a20, double a21, double a22, double a23,
double a30, double a31, double a32, double a33)
{
double m01 = a10*a01 - a00*a11;
double m02 = a20*a01 - a00*a21;
double m03 = a30*a01 - a00*a31;
double m12 = a20*a11 - a10*a21;
double m13 = a30*a11 - a10*a31;
double m23 = a30*a21 - a20*a31;
double m012 = m12*a02 - m02*a12 + m01*a22;
double m013 = m13*a02 - m03*a12 + m01*a32;
double m023 = m23*a02 - m03*a22 + m02*a32;
double m123 = m23*a12 - m13*a22 + m12*a32;
double m0123 = m123*a03 - m023*a13 + m013*a23 - m012*a33;
return m0123;
}
int orientationC4(double p0, double p1, double p2, double p3,
double q0, double q1, double q2, double q3,
double r0, double r1, double r2, double r3,
double s0, double s1, double s2, double s3,
double t0, double t1, double t2, double t3)
group p0 q0 r0 t0 q0;
group p1 q1 r1 t1 q1;
group p2 q2 r2 t2 q2;
group p3 q3 r3 t3 q3;
{
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double det = determinant(m01, m02, m03, m04,
m11, m12, m13, m14,
m21, m22, m23, m24,
m31, m32, m33, m34);
return sign(det);
}
//===========generated ==================
inline int orientationC4( double p0, double p1, double p2, double p3, double q0, double q1, double q2, double q3, double r0, double r1, double r2, double r3, double s0, double s1, double s2, double s3, double t0, double t1, double t2, double t3) {
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double det;
det = determinant( m01, m02, m03, m04, m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34 );
int int_tmp_result;
double eps;
double max1 = CGAL::abs(m01);
double am = CGAL::abs(m02);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m03);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m11);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m12);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m13);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m23);
if( (max1 < am) ) { max1 = am; }
double max2 = CGAL::abs(m01);
am = CGAL::abs(m02);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m11);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m12);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m21);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m22);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m23);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m33);
if( (max2 < am) ) { max2 = am; }
double max3 = CGAL::abs(m04);
am = CGAL::abs(m14);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m24);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m34);
if( (max3 < am) ) { max3 = am; }
double max4 = CGAL::abs(m11);
am = CGAL::abs(m12);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m21);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m22);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m31);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m32);
if( (max4 < am) ) { max4 = am; }
double lower_bound_1;
double upper_bound_1;
lower_bound_1 = max1;
upper_bound_1 = max1;
if( (max2 < lower_bound_1) )
{
lower_bound_1 = max2;
}
else
{
if( (max2 > upper_bound_1) )
{
upper_bound_1 = max2;
}
}
if( (max3 < lower_bound_1) )
{
lower_bound_1 = max3;
}
else
{
if( (max3 > upper_bound_1) )
{
upper_bound_1 = max3;
}
}
if( (max4 < lower_bound_1) )
{
lower_bound_1 = max4;
}
else
{
if( (max4 > upper_bound_1) )
{
upper_bound_1 = max4;
}
}
if( (lower_bound_1 < 2.89273249588395272840e-74) )
{
return FPG_UNCERTAIN_VALUE;
}
else
{
if( (upper_bound_1 > 7.23700557733225900010e+75) )
{
return FPG_UNCERTAIN_VALUE;
}
eps = (3.17768858673611327578e-14 * (((max4 * max2) * max1) * max3));
if( (det > eps) )
{
int_tmp_result = 1;
}
else
{
if( (det < -eps) )
{
int_tmp_result = -1;
}
else
{
return FPG_UNCERTAIN_VALUE;
}
}
}
return int_tmp_result;
}
#endif

View File

@ -0,0 +1,345 @@
// Copyright (c) 2025
// INRIA Saclay-Ile de France (France)
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Andreas Fabri
// Files needed as input for the static filter generator
#if 0
double
determinant(
double a00, double a01, double a02, double a03, double a04,
double a10, double a11, double a12, double a13, double a14,
double a20, double a21, double a22, double a23, double a24,
double a30, double a31, double a32, double a33, double a34,
double a40, double a41, double a42, double a43, double a44)
{
double m01 = a10*a01 - a00*a11;
double m02 = a20*a01 - a00*a21;
double m03 = a30*a01 - a00*a31;
double m04 = a40*a01 - a00*a41;
double m12 = a20*a11 - a10*a21;
double m13 = a30*a11 - a10*a31;
double m14 = a40*a11 - a10*a41;
double m23 = a30*a21 - a20*a31;
double m24 = a40*a21 - a20*a41;
double m34 = a40*a31 - a30*a41;
double m012 = m12*a02 - m02*a12 + m01*a22;
double m013 = m13*a02 - m03*a12 + m01*a32;
double m014 = m14*a02 - m04*a12 + m01*a42;
double m023 = m23*a02 - m03*a22 + m02*a32;
double m024 = m24*a02 - m04*a22 + m02*a42;
double m034 = m34*a02 - m04*a32 + m03*a42;
double m123 = m23*a12 - m13*a22 + m12*a32;
double m124 = m24*a12 - m14*a22 + m12*a42;
double m134 = m34*a12 - m14*a32 + m13*a42;
double m234 = m34*a22 - m24*a32 + m23*a42;
double m0123 = m123*a03 - m023*a13 + m013*a23 - m012*a33;
double m0124 = m124*a03 - m024*a13 + m014*a23 - m012*a43;
double m0134 = m134*a03 - m034*a13 + m014*a33 - m013*a43;
double m0234 = m234*a03 - m034*a23 + m024*a33 - m023*a43;
double m1234 = m234*a13 - m134*a23 + m124*a33 - m123*a43;
double m01234 = m1234*a04 - m0234*a14 + m0134*a24 - m0124*a34 + m0123*a44;
return m01234;
}
int orientationC5(double p0, double p1, double p2, double p3, double p4,
double q0, double q1, double q2, double q3, double q4,
double r0, double r1, double r2, double r3, double r4,
double s0, double s1, double s2, double s3, double s4,
double t0, double t1, double t2, double t3, double t4,
double u0, double u1, double u2, double u3, double u4)
group p0 q0 r0 t0 q0 u0;
group p1 q1 r1 t1 q1 u1;
group p2 q2 r2 t2 q2 u2;
group p3 q3 r3 t3 q3 u3;
group p4 q4 r4 t4 q4 u4;
{
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m05;
m05 = (u0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m15;
m15 = (u1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m25;
m25 = (u2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double m35;
m35 = (u3 - p3);
double m41;
m41 = (q4 - p4);
double m42;
m42 = (r4 - p4);
double m43;
m43 = (s4 - p4);
double m44;
m44 = (t4 - p4);
double m45;
m45 = (u4 - p4);
double det = determinant(m01, m02, m03, m04, m05,
m11, m12, m13, m14, m15,
m21, m22, m23, m24, m25,
m31, m32, m33, m34, m35,
m41, m42, m43, m44, m45);
return sign(det);
}
//===========generated ==================
inline int orientationC5( double p0, double p1, double p2, double p3, double p4, double q0, double q1, double q2, double q3, double q4, double r0, double r1, double r2, double r3, double r4, double s0, double s1, double s2, double s3, double s4, double t0, double t1, double t2, double t3, double t4, double u0, double u1, double u2, double u3, double u4) {
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m05;
m05 = (u0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m15;
m15 = (u1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m25;
m25 = (u2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double m35;
m35 = (u3 - p3);
double m41;
m41 = (q4 - p4);
double m42;
m42 = (r4 - p4);
double m43;
m43 = (s4 - p4);
double m44;
m44 = (t4 - p4);
double m45;
m45 = (u4 - p4);
double det;
det = determinant( m01, m02, m03, m04, m05, m11, m12, m13, m14, m15, m21, m22, m23, m24, m25, m31, m32, m33, m34, m35, m41, m42, m43, m44, m45 );
int int_tmp_result;
double eps;
double max1 = CGAL::abs(m01);
double am = CGAL::abs(m02);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m03);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m11);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m12);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m13);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m21);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m22);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m23);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m33);
if( (max1 < am) ) { max1 = am; }
double max2 = CGAL::abs(m01);
am = CGAL::abs(m02);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m11);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m12);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m21);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m22);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m23);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m31);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m32);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m33);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m43);
if( (max2 < am) ) { max2 = am; }
double max3 = CGAL::abs(m04);
am = CGAL::abs(m14);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m24);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m34);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m44);
if( (max3 < am) ) { max3 = am; }
double max4 = CGAL::abs(m05);
am = CGAL::abs(m15);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m25);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m35);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m45);
if( (max4 < am) ) { max4 = am; }
double max5 = CGAL::abs(m11);
am = CGAL::abs(m12);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m21);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m22);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m31);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m32);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m41);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m42);
if( (max5 < am) ) { max5 = am; }
double lower_bound_1;
double upper_bound_1;
lower_bound_1 = max5;
upper_bound_1 = max5;
if( (max1 < lower_bound_1) )
{
lower_bound_1 = max1;
}
else
{
if( (max1 > upper_bound_1) )
{
upper_bound_1 = max1;
}
}
if( (max2 < lower_bound_1) )
{
lower_bound_1 = max2;
}
else
{
if( (max2 > upper_bound_1) )
{
upper_bound_1 = max2;
}
}
if( (max3 < lower_bound_1) )
{
lower_bound_1 = max3;
}
else
{
if( (max3 > upper_bound_1) )
{
upper_bound_1 = max3;
}
}
if( (max4 < lower_bound_1) )
{
lower_bound_1 = max4;
}
else
{
if( (max4 > upper_bound_1) )
{
upper_bound_1 = max4;
}
}
if( (lower_bound_1 < 9.99657131447050328602e-60) )
{
return FPG_UNCERTAIN_VALUE;
}
else
{
if( (upper_bound_1 > 3.21387608851797912384e+60) )
{
return FPG_UNCERTAIN_VALUE;
}
eps = (2.22889232457534740153e-13 * ((((max5 * max2) * max1) * max3) * max4));
if( (det > eps) )
{
int_tmp_result = 1;
}
else
{
if( (det < -eps) )
{
int_tmp_result = -1;
}
else
{
return FPG_UNCERTAIN_VALUE;
}
}
}
return int_tmp_result;
}
#endif

View File

@ -0,0 +1,477 @@
// Copyright (c) 2025
// INRIA Saclay-Ile de France (France)
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Andreas Fabri
// Files needed as input for the static filter generator
#if 0
double
determinant(
double a00, double a01, double a02, double a03, double a04, double a05,
double a10, double a11, double a12, double a13, double a14, double a15,
double a20, double a21, double a22, double a23, double a24, double a25,
double a30, double a31, double a32, double a33, double a34, double a35,
double a40, double a41, double a42, double a43, double a44, double a45,
double a50, double a51, double a52, double a53, double a54, double a55)
{
double m01 = a00*a11 - a10*a01;
double m02 = a00*a21 - a20*a01;
double m03 = a00*a31 - a30*a01;
double m04 = a00*a41 - a40*a01;
double m05 = a00*a51 - a50*a01;
double m12 = a10*a21 - a20*a11;
double m13 = a10*a31 - a30*a11;
double m14 = a10*a41 - a40*a11;
double m15 = a10*a51 - a50*a11;
double m23 = a20*a31 - a30*a21;
double m24 = a20*a41 - a40*a21;
double m25 = a20*a51 - a50*a21;
double m34 = a30*a41 - a40*a31;
double m35 = a30*a51 - a50*a31;
double m45 = a40*a51 - a50*a41;
double m012 = m01*a22 - m02*a12 + m12*a02;
double m013 = m01*a32 - m03*a12 + m13*a02;
double m014 = m01*a42 - m04*a12 + m14*a02;
double m015 = m01*a52 - m05*a12 + m15*a02;
double m023 = m02*a32 - m03*a22 + m23*a02;
double m024 = m02*a42 - m04*a22 + m24*a02;
double m025 = m02*a52 - m05*a22 + m25*a02;
double m034 = m03*a42 - m04*a32 + m34*a02;
double m035 = m03*a52 - m05*a32 + m35*a02;
double m045 = m04*a52 - m05*a42 + m45*a02;
double m123 = m12*a32 - m13*a22 + m23*a12;
double m124 = m12*a42 - m14*a22 + m24*a12;
double m125 = m12*a52 - m15*a22 + m25*a12;
double m134 = m13*a42 - m14*a32 + m34*a12;
double m135 = m13*a52 - m15*a32 + m35*a12;
double m145 = m14*a52 - m15*a42 + m45*a12;
double m234 = m23*a42 - m24*a32 + m34*a22;
double m235 = m23*a52 - m25*a32 + m35*a22;
double m245 = m24*a52 - m25*a42 + m45*a22;
double m345 = m34*a52 - m35*a42 + m45*a32;
double m0123 = m012*a33 - m013*a23 + m023*a13 - m123*a03;
double m0124 = m012*a43 - m014*a23 + m024*a13 - m124*a03;
double m0125 = m012*a53 - m015*a23 + m025*a13 - m125*a03;
double m0134 = m013*a43 - m014*a33 + m034*a13 - m134*a03;
double m0135 = m013*a53 - m015*a33 + m035*a13 - m135*a03;
double m0145 = m014*a53 - m015*a43 + m045*a13 - m145*a03;
double m0234 = m023*a43 - m024*a33 + m034*a23 - m234*a03;
double m0235 = m023*a53 - m025*a33 + m035*a23 - m235*a03;
double m0245 = m024*a53 - m025*a43 + m045*a23 - m245*a03;
double m0345 = m034*a53 - m035*a43 + m045*a33 - m345*a03;
double m1234 = m123*a43 - m124*a33 + m134*a23 - m234*a13;
double m1235 = m123*a53 - m125*a33 + m135*a23 - m235*a13;
double m1245 = m124*a53 - m125*a43 + m145*a23 - m245*a13;
double m1345 = m134*a53 - m135*a43 + m145*a33 - m345*a13;
double m2345 = m234*a53 - m235*a43 + m245*a33 - m345*a23;
double m01234 = m0123*a44 - m0124*a34 + m0134*a24 - m0234*a14 + m1234*a04;
double m01235 = m0123*a54 - m0125*a34 + m0135*a24 - m0235*a14 + m1235*a04;
double m01245 = m0124*a54 - m0125*a44 + m0145*a24 - m0245*a14 + m1245*a04;
double m01345 = m0134*a54 - m0135*a44 + m0145*a34 - m0345*a14 + m1345*a04;
double m02345 = m0234*a54 - m0235*a44 + m0245*a34 - m0345*a24 + m2345*a04;
double m12345 = m1234*a54 - m1235*a44 + m1245*a34 - m1345*a24 + m2345*a14;
double m012345 = m01234*a55 - m01235*a45 + m01245*a35 - m01345*a25
+ m02345*a15 - m12345*a05;
return m012345;
}
int orientationC6(double p0, double p1, double p2, double p3, double p4, double p5,
double q0, double q1, double q2, double q3, double q4, double q5,
double r0, double r1, double r2, double r3, double r4, double r5,
double s0, double s1, double s2, double s3, double s4, double s5,
double t0, double t1, double t2, double t3, double t4, double t5,
double u0, double u1, double u2, double u3, double u4, double u5,
double v0, double v1, double v2, double v3, double v4, double v5)
group p0 q0 r0 t0 q0 u0 v0;
group p1 q1 r1 t1 q1 u1 v1;
group p2 q2 r2 t2 q2 u2 v2;
group p3 q3 r3 t3 q3 u3 v3;
group p4 q4 r4 t4 q4 u4 v4;
group p5 q5 r5 t5 q5 u5 v5;
{
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m05;
m05 = (u0 - p0);
double m06;
m06 = (v0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m15;
m15 = (u1 - p1);
double m16;
m16 = (v1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m25;
m25 = (u2 - p2);
double m26;
m26 = (v2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double m35;
m35 = (u3 - p3);
double m36;
m36 = (v3 - p3);
double m41;
m41 = (q4 - p4);
double m42;
m42 = (r4 - p4);
double m43;
m43 = (s4 - p4);
double m44;
m44 = (t4 - p4);
double m45;
m45 = (u4 - p4);
double m46;
m46 = (v4 - p4);
double m51;
m51 = (q5 - p5);
double m52;
m52 = (r5 - p5);
double m53;
m53 = (s5 - p5);
double m54;
m54 = (t5 - p5);
double m55;
m55 = (u5 - p5);
double m56;
m56 = (v5 - p5);
double det = determinant(m01, m02, m03, m04, m05, m06,
m11, m12, m13, m14, m15, m16,
m21, m22, m23, m24, m25, m26,
m31, m32, m33, m34, m35, m36,
m41, m42, m43, m44, m45, m46,
m51, m52, m53, m54, m55, m56);
return sign(det);
}
//===========generated ==================
inline int orientationC6( double p0, double p1, double p2, double p3, double p4, double p5, double q0, double q1, double q2, double q3, double q4, double q5, double r0, double r1, double r2, double r3, double r4, double r5, double s0, double s1, double s2, double s3, double s4, double s5, double t0, double t1, double t2, double t3, double t4, double t5, double u0, double u1, double u2, double u3, double u4, double u5, double v0, double v1, double v2, double v3, double v4, double v5) {
double m01;
m01 = (q0 - p0);
double m02;
m02 = (r0 - p0);
double m03;
m03 = (s0 - p0);
double m04;
m04 = (t0 - p0);
double m05;
m05 = (u0 - p0);
double m06;
m06 = (v0 - p0);
double m11;
m11 = (q1 - p1);
double m12;
m12 = (r1 - p1);
double m13;
m13 = (s1 - p1);
double m14;
m14 = (t1 - p1);
double m15;
m15 = (u1 - p1);
double m16;
m16 = (v1 - p1);
double m21;
m21 = (q2 - p2);
double m22;
m22 = (r2 - p2);
double m23;
m23 = (s2 - p2);
double m24;
m24 = (t2 - p2);
double m25;
m25 = (u2 - p2);
double m26;
m26 = (v2 - p2);
double m31;
m31 = (q3 - p3);
double m32;
m32 = (r3 - p3);
double m33;
m33 = (s3 - p3);
double m34;
m34 = (t3 - p3);
double m35;
m35 = (u3 - p3);
double m36;
m36 = (v3 - p3);
double m41;
m41 = (q4 - p4);
double m42;
m42 = (r4 - p4);
double m43;
m43 = (s4 - p4);
double m44;
m44 = (t4 - p4);
double m45;
m45 = (u4 - p4);
double m46;
m46 = (v4 - p4);
double m51;
m51 = (q5 - p5);
double m52;
m52 = (r5 - p5);
double m53;
m53 = (s5 - p5);
double m54;
m54 = (t5 - p5);
double m55;
m55 = (u5 - p5);
double m56;
m56 = (v5 - p5);
double det;
det = determinant( m01, m02, m03, m04, m05, m06, m11, m12, m13, m14, m15, m16, m21, m22, m23, m24, m25, m26, m31, m32, m33, m34, m35, m36, m41, m42, m43, m44, m45, m46, m51, m52, m53, m54, m55, m56 );
int int_tmp_result;
double eps;
double max1 = CGAL::abs(m01);
double am = CGAL::abs(m02);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m11);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m12);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m21);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m22);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m31);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m32);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m41);
if( (max1 < am) ) { max1 = am; }
am = CGAL::abs(m42);
if( (max1 < am) ) { max1 = am; }
double max2 = CGAL::abs(m03);
am = CGAL::abs(m11);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m12);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m13);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m21);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m22);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m23);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m31);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m32);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m33);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m41);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m42);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m43);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m51);
if( (max2 < am) ) { max2 = am; }
am = CGAL::abs(m52);
if( (max2 < am) ) { max2 = am; }
double max3 = CGAL::abs(m04);
am = CGAL::abs(m14);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m24);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m34);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m44);
if( (max3 < am) ) { max3 = am; }
am = CGAL::abs(m54);
if( (max3 < am) ) { max3 = am; }
double max4 = CGAL::abs(m05);
am = CGAL::abs(m15);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m25);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m35);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m45);
if( (max4 < am) ) { max4 = am; }
am = CGAL::abs(m55);
if( (max4 < am) ) { max4 = am; }
double max5 = CGAL::abs(m06);
am = CGAL::abs(m16);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m26);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m36);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m46);
if( (max5 < am) ) { max5 = am; }
am = CGAL::abs(m56);
if( (max5 < am) ) { max5 = am; }
double max6 = CGAL::abs(m13);
am = CGAL::abs(m21);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m22);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m23);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m31);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m32);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m33);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m41);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m42);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m43);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m51);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m52);
if( (max6 < am) ) { max6 = am; }
am = CGAL::abs(m53);
if( (max6 < am) ) { max6 = am; }
double lower_bound_1;
double upper_bound_1;
lower_bound_1 = max6;
upper_bound_1 = max6;
if( (max5 < lower_bound_1) )
{
lower_bound_1 = max5;
}
else
{
if( (max5 > upper_bound_1) )
{
upper_bound_1 = max5;
}
}
if( (max1 < lower_bound_1) )
{
lower_bound_1 = max1;
}
else
{
if( (max1 > upper_bound_1) )
{
upper_bound_1 = max1;
}
}
if( (max2 < lower_bound_1) )
{
lower_bound_1 = max2;
}
else
{
if( (max2 > upper_bound_1) )
{
upper_bound_1 = max2;
}
}
if( (max3 < lower_bound_1) )
{
lower_bound_1 = max3;
}
else
{
if( (max3 > upper_bound_1) )
{
upper_bound_1 = max3;
}
}
if( (max4 < lower_bound_1) )
{
lower_bound_1 = max4;
}
else
{
if( (max4 > upper_bound_1) )
{
upper_bound_1 = max4;
}
}
if( (lower_bound_1 < 4.82472686053427214432e-50) )
{
return FPG_UNCERTAIN_VALUE;
}
else
{
if( (upper_bound_1 > 1.87072209578355511223e+50) )
{
return FPG_UNCERTAIN_VALUE;
}
eps = (1.76403842114300859158e-12 * (((((max1 * max2) * max6) * max3) * max4) * max5));
if( (det > eps) )
{
int_tmp_result = 1;
}
else
{
if( (det < -eps) )
{
int_tmp_result = -1;
}
else
{
return FPG_UNCERTAIN_VALUE;
}
}
}
return int_tmp_result;
}
#endif

View File

@ -11,10 +11,17 @@ include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
include_directories(BEFORE "include")
create_single_source_cgal_program("generate_d.cpp")
create_single_source_cgal_program("bench4d.cpp")
create_single_source_cgal_program("bench5d.cpp")
create_single_source_cgal_program("bench6d.cpp")
create_single_source_cgal_program("delaunay.cpp")
target_link_libraries(delaunay PRIVATE CGAL::Eigen3_support)
create_single_source_cgal_program("Td_vs_T2_and_T3.cpp")
target_link_libraries(Td_vs_T2_and_T3 PRIVATE CGAL::Eigen3_support)
target_link_libraries(bench4d PRIVATE CGAL::Eigen3_support)
target_link_libraries(bench5d PRIVATE CGAL::Eigen3_support)
target_link_libraries(bench6d PRIVATE CGAL::Eigen3_support)
else()
message("NOTICE: Executables in this directory require Eigen 3.1 (or greater), and will not be compiled.")
endif()

View File

@ -0,0 +1,64 @@
// Switch off the static filters for 4, 5, and 6 points.
// #define CGAL_NO_STATIC_FILTER_456
#include <CGAL/Epick_d.h>
#include <CGAL/Triangulation.h>
#include <CGAL/algorithm.h>
#include <CGAL/Timer.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <vector>
typedef CGAL::Epick_d< CGAL::Dimension_tag<4> > K;
typedef CGAL::Triangulation_vertex<K> Vertex;
typedef CGAL::Triangulation_ds_full_cell<void,CGAL::TDS_full_cell_mirror_storage_policy> DS_full_cell;
typedef CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data, DS_full_cell> Full_cell;
typedef CGAL::Triangulation_data_structure<CGAL::Dimension_tag<4>,
Vertex,
Full_cell> TDS;
typedef CGAL::Triangulation<K,TDS> Triangulation;
int main()
{
const int D = 4; // we work in Euclidean 4-space
std::vector<Triangulation::Point> points;
std::ifstream in("points_4.txt");
Triangulation::Point p;
int d;
in >> d;
assert(d == D);
int n;
in >> n;
std::cout << n << " points in dimension " << d << std::endl;
points.reserve(n);
while (in >> p) {
points.push_back(p);
}
CGAL::Timer timer;
timer.start();
Triangulation t(D); // create triangulation
assert(t.empty());
//std::array<double, 4> ar = { 0, 0, 0, 0};
//Triangulation::Point orig(ar.begin(), ar.end());
//t.insert(orig); // insert origin
t.insert(points.begin(), points.end()); // compute triangulation
std::cout << "Time taken to insert "<< points.size() << " points: " << timer.time() << " seconds." << std::endl;
timer.reset();
assert( t.is_valid() );
// - - - - - - - - - - - - - - - - - - - - - - - - STEP 2
typedef Triangulation::Face Face;
typedef std::vector<Face> Faces;
Faces edges;
std::back_insert_iterator<Faces> out(edges);
t.tds().incident_faces(t.infinite_vertex(), 1, out);
// collect faces of dimension 1 (edges) incident to the infinite vertex
std::cout << "There are " << edges.size()
<< " vertices on the convex hull." << std::endl;
std::cout << "Time taken to find edges: " << timer.time() << " seconds." << std::endl;
return 0;
}

View File

@ -0,0 +1,64 @@
// Switch off the static filters for 4, 5, and 6 points.
// #define CGAL_NO_STATIC_FILTER_456
#include <CGAL/Epick_d.h>
#include <CGAL/Triangulation.h>
#include <CGAL/algorithm.h>
#include <CGAL/Timer.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <vector>
typedef CGAL::Epick_d< CGAL::Dimension_tag<5> > K;
typedef CGAL::Triangulation_vertex<K> Vertex;
typedef CGAL::Triangulation_ds_full_cell<void,CGAL::TDS_full_cell_mirror_storage_policy> DS_full_cell;
typedef CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data, DS_full_cell> Full_cell;
typedef CGAL::Triangulation_data_structure<CGAL::Dimension_tag<5>,
Vertex,
Full_cell> TDS;
typedef CGAL::Triangulation<K,TDS> Triangulation;
int main()
{
const int D = 5; // we work in Euclidean 5-space
std::vector<Triangulation::Point> points;
std::ifstream in("points_5.txt");
Triangulation::Point p;
int d;
in >> d;
assert(d == D);
int n;
in >> n;
points.reserve(n);
while (in >> p) {
points.push_back(p);
}
CGAL::Timer timer;
timer.start();
Triangulation t(D); // create triangulation
assert(t.empty());
//std::array<double, 5> ar = { 0, 0, 0, 0, 0 };
//Triangulation::Point orig(ar.begin(), ar.end());
//t.insert(orig); // insert origin
t.insert(points.begin(), points.end()); // compute triangulation
std::cout << "Time taken to insert "<< points.size() << " points: " << timer.time() << " seconds." << std::endl;
timer.reset();
assert( t.is_valid() );
// - - - - - - - - - - - - - - - - - - - - - - - - STEP 2
typedef Triangulation::Face Face;
typedef std::vector<Face> Faces;
Faces edges;
std::back_insert_iterator<Faces> out(edges);
t.tds().incident_faces(t.infinite_vertex(), 1, out);
// collect faces of dimension 1 (edges) incident to the infinite vertex
std::cout << "There are " << edges.size()
<< " vertices on the convex hull." << std::endl;
std::cout << "Time taken to find edges: " << timer.time() << " seconds." << std::endl;
return 0;
}

View File

@ -0,0 +1,83 @@
#include <CGAL/Epick_d.h>
#include <CGAL/Triangulation.h>
#include <CGAL/algorithm.h>
#include <CGAL/Timer.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <vector>
typedef CGAL::Epick_d< CGAL::Dimension_tag<6> > K;
typedef CGAL::Triangulation_vertex<K, std::ptrdiff_t> Vertex;
typedef CGAL::Triangulation_ds_full_cell<void,CGAL::TDS_full_cell_mirror_storage_policy> DS_full_cell;
typedef CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data, DS_full_cell> Full_cell;
typedef CGAL::Triangulation_data_structure<CGAL::Dimension_tag<6>,
Vertex,
Full_cell> TDS;
typedef CGAL::Triangulation<K,TDS> Triangulation;
int main(int argc, char* argv[])
{
const int D = 6; // we work in Euclidean 6-space
std::vector<Triangulation::Point> points;
std::ifstream in(argv[1]);
Triangulation::Point p;
int d;
in >> d;
assert(d == D);
int n;
in >> n;
points.reserve(n);
while (in >> p) {
points.push_back(p);
}
CGAL::Timer timer;
timer.start();
Triangulation t(D); // create triangulation
assert(t.empty());
t.insert_and_index(points.begin(), points.end()); // compute triangulation
std::cout << "Time taken to insert "<< points.size() << " points: " << timer.time() << " seconds." << std::endl;
timer.reset();
assert( t.is_valid() );
std::vector<Triangulation::Full_cell_handle> infinite_cells;
t.tds().incident_full_cells(t.infinite_vertex(), std::back_inserter(infinite_cells));
return 0;
std::set<std::pair<std::ptrdiff_t, std::ptrdiff_t>> edges;
for(auto ch : infinite_cells) {
std::vector<Triangulation::Vertex_handle> vertices;
std::cout << "cell" << std::endl;
vertices.reserve(D);
for(int i = 0; i < D + 1; ++i) {
if(ch->vertex(i) != t.infinite_vertex()) {
vertices.push_back(ch->vertex(i));
std::cout << ch->vertex(i)->data() << " ";
}
}
std::cout << std::endl;
for (int i = 0; i < D-1; i++) {
for (int j = 0; j < D-1; j++) {
if((i != j) && (vertices[i]->data() < vertices[j]->data())) {
edges.insert(std::make_pair(vertices[i]->data(), vertices[j]->data()));
}
}
}
}
for(auto pair : edges) {
std::cout << "edge between vertices " << pair.first << " and " << pair.second << std::endl;
}
std::cout << "Time taken to find edges: " << timer.time() << " seconds." << std::endl;
return 0;
}

View File

@ -0,0 +1,24 @@
#include <CGAL/Random.h>
#include <array>
#include <iostream>
int main() {
CGAL::Random rng;
std::cout.precision(17);
std ::cout << 4 << std::endl;
std::cout << 100000 << std::endl;
for(int i = 0; i < 100000; ++i) {
std::array<double, 4> arr;
double slength = 0;
for(int i = 0; i < arr.size(); ++i) {
arr[i] = rng.get_double(-1, 1);
slength += arr[i] * arr[i];
}
slength = std::sqrt(slength);
for(int i = 0; i < arr.size(); ++i) {
arr[i] /= slength;
}
std::cout << "4 " << arr[0] << " " << arr[1] << " " << arr[2] << " " << arr[3] /* << " " << arr[4] /* << " " << arr[5] */ << std::endl;
}
return 0;
}

View File

@ -0,0 +1,10 @@
namespace CGAL {
/*!
\ingroup PkgTriangulationsRef
A tag class to indicate that no mirror indices are stored in full cells.
*/
class TDS_full_cell_default_storage_policy
{};
}

View File

@ -0,0 +1,11 @@
namespace CGAL {
/*!
\ingroup PkgTriangulationsRef
A tag class to indicate that mirror indices are stored in full cells.
\pre The dimension is not larger than 127.
*/
class TDS_full_cell_mirror_storage_policy
{};
}

View File

@ -520,7 +520,7 @@ position `p`. Returns a handle to that vertex.
\pre The boundary of the union of full cells incident to `f` must be a triangulation of a
sphere of dimension `tr`.`current_dimension()`).
*/
Vertex_handle collapse_face(const Point & p, const Face & f);
Vertex_handle contract_face(const Point & p, const Face & f);
/// @}

View File

@ -26,8 +26,8 @@ which is also the unique vertex and the unique full cell in the
`TriangulationDataStructure`.
In a
geometric realization of the `TriangulationDataStructure` (<I>e.g.</I>, in a
`Triangulation<TriangulationTraits_, TriangulationDataStructure_>` or a
`Delaunay_triangulation<DelaunayTriangulationTraits_, TriangulationDataStructure_>`), this vertex
`CGAL::Triangulation<TriangulationTraits_, TriangulationDataStructure_>` or a
`CGAL::Delaunay_triangulation<DelaunayTriangulationTraits_, TriangulationDataStructure_>`), this vertex
corresponds to <I>the vertex at infinity</I>.
<DT><B>0</B><DD> This corresponds to two vertices, each incident to one \f$ 0\f$-face;
@ -456,14 +456,14 @@ Insertion in a hole, \f$ d=2\f$
\cgalAdvancedEnd
*/
template< class ForwardIterator > Vertex_handle
insert_in_hole(ForwardIterator start, ForwardIterator end, Facet f);
insert_in_hole(ForwardIterator s, ForwardIterator e, Facet f);
/*!
Same as above, but handles to the new full cells are
appended to the `out` output iterator.
*/
template< class ForwardIterator, class OutputIterator >
Vertex_handle insert_in_hole(ForwardIterator start, ForwardIterator end, Facet
Vertex_handle insert_in_hole(ForwardIterator s, ForwardIterator e, Facet
f, OutputIterator out);
/*!
@ -594,7 +594,7 @@ Calls `delete_full_cell` over an iterator range of value type `Full_cell_handle`
\cgalAdvancedEnd
*/
template< typename ForwardIterator > void
delete_full_cells(ForwardIterator start, ForwardIterator end);
delete_full_cells(ForwardIterator s, ForwardIterator e);
/// @}

View File

@ -101,6 +101,8 @@ The latter two concepts are also abbreviated respectively as `TrVertex` and `TrF
- `CGAL::Triangulation_ds_vertex<TriangulationDataStructure_>`
- `CGAL::Triangulation_ds_full_cell<TriangulationDataStructure_, TriangulationDSFullCellStoragePolicy>`
- `CGAL::Triangulation_face<TriangulationDataStructure_>`
- `CGAL::TDS_full_cell_default_storage_policy`
- `CGAL::TDS_full_cell_mirror_storage_policy`
\cgalCRPSection{(Geometric) Triangulations}

View File

@ -22,6 +22,8 @@
#include <CGAL/Triangulation_vertex.h>
#include <CGAL/Iterator_project.h>
#include <CGAL/spatial_sort.h>
#include <CGAL/Spatial_sort_traits_adapter_d.h>
#include <CGAL/property_map.h> // for CGAL::Identity_property_map
#include <CGAL/Dimension.h>
#include <CGAL/iterator.h>
#include <CGAL/Default.h>
@ -721,6 +723,34 @@ public:
}
return number_of_vertices() - n;
}
template< typename RandomAccessIterator >
size_type insert_and_index(RandomAccessIterator start, RandomAccessIterator end)
{
size_type n = number_of_vertices();
std::vector<std::ptrdiff_t> indices(boost::counting_iterator<std::ptrdiff_t>(0),
boost::counting_iterator<std::ptrdiff_t>(end - start));
using Point_property_map = boost::iterator_property_map<RandomAccessIterator,
CGAL::Identity_property_map<std::ptrdiff_t>>;
using Search_traits_d = CGAL::Spatial_sort_traits_adapter_d<Geom_traits, Point_property_map>;
CGAL::spatial_sort(indices.begin(), indices.end(), Search_traits_d(start));
Full_cell_handle hint = Full_cell_handle();
for (auto index : indices) {
typename Triangulation::Vertex_handle pos = insert(*(start+index), hint);
if (pos != nullptr) {
// Save index value as data to retrieve it after insertion
pos->data() = n+index;
hint = pos->full_cell();
}
}
return number_of_vertices() - n;
}
Vertex_handle insert(const Point &, Locate_type, const Face &, const Facet &, Full_cell_handle);
Vertex_handle insert(const Point &, Full_cell_handle start = Full_cell_handle());
Vertex_handle insert(const Point &, Vertex_handle);

View File

@ -30,8 +30,11 @@
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <boost/iterator/counting_iterator.hpp>
namespace CGAL {
template< class Dimen,
@ -138,7 +141,7 @@ protected: // DATA MEMBERS
int dmax_, dcur_; // dimension of the current triangulation
Vertex_container vertices_; // list of all vertices
Full_cell_container full_cells_; // list of all full cells
mutable std::vector<Full_cell_handle> visited;
private:
void clean_dynamic_memory()
@ -306,10 +309,10 @@ public:
return s->mirror_index(i);
}
int mirror_vertex(Full_cell_handle s, int i) const /* Concept */
Vertex_handle mirror_vertex(Full_cell_handle s, int i) const /* Concept */
{
CGAL_precondition(Full_cell_handle() != s && check_range(i));
return s->mirror_vertex(i);
return s->mirror_vertex(i, current_dimension());
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FACETS OPERATIONS
@ -365,7 +368,7 @@ protected:
public:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - REMOVALS
Vertex_handle collapse_face(const Face &); /* Concept */
Vertex_handle contract_face(const Face &); /* Concept */
void remove_decrease_dimension(Vertex_handle, Vertex_handle); /* Concept */
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERTIONS
@ -374,12 +377,12 @@ public:
Vertex_handle insert_in_face(const Face &); /* Concept */
Vertex_handle insert_in_facet(const Facet &); /* Concept */
template< typename Forward_iterator >
Vertex_handle insert_in_hole(Forward_iterator, Forward_iterator, Facet); /* Concept */
Vertex_handle insert_in_hole(Forward_iterator, Forward_iterator, const Facet&); /* Concept */
template< typename Forward_iterator, typename OutputIterator >
Vertex_handle insert_in_hole(Forward_iterator, Forward_iterator, Facet, OutputIterator); /* Concept */
Vertex_handle insert_in_hole(Forward_iterator, Forward_iterator, const Facet&, OutputIterator); /* Concept */
template< typename OutputIterator >
Full_cell_handle insert_in_tagged_hole(Vertex_handle, Facet, OutputIterator);
Full_cell_handle insert_in_tagged_hole(Vertex_handle, const Facet&, OutputIterator);
Vertex_handle insert_increase_dimension(Vertex_handle=Vertex_handle()); /* Concept */
@ -667,8 +670,10 @@ Triangulation_data_structure<Dim, Vb, Fcb>
TraversalPredicate & tp,
OutputIterator & out) const /* Concept */
{
CGAL_precondition(visited.empty());
std::queue<Full_cell_handle> queue;
set_visited(start, true);
visited.push_back(start);
queue.push(start);
const int cur_dim = current_dimension();
Facet ft;
@ -684,6 +689,7 @@ Triangulation_data_structure<Dim, Vb, Fcb>
if( ! get_visited(n) )
{
set_visited(n, true);
visited.push_back(n);
if( tp(Facet(s, i)) )
queue.push(n);
else
@ -691,7 +697,9 @@ Triangulation_data_structure<Dim, Vb, Fcb>
}
}
}
clear_visited_marks(start);
for(auto fch : visited)
set_visited(fch, false);
visited.clear();
return ft;
}
@ -776,13 +784,13 @@ Triangulation_data_structure<Dim, Vb, Fcb>
template <class Dim, class Vb, class Fcb>
typename Triangulation_data_structure<Dim, Vb, Fcb>::Vertex_handle
Triangulation_data_structure<Dim, Vb, Fcb>
::collapse_face(const Face & f) /* Concept */
::contract_face(const Face & f) /* Concept */
{
const int fd = f.face_dimension();
CGAL_precondition( (1 <= fd ) && (fd < current_dimension()));
std::vector<Full_cell_handle> simps;
// save the Face's vertices:
Full_cell s;
Full_cell s(current_dimension());
for( int i = 0; i <= fd; ++i )
s.set_vertex(i, f.vertex(i));
// compute the star of f
@ -926,7 +934,7 @@ template <class Dim, class Vb, class Fcb >
template < typename OutputIterator >
typename Triangulation_data_structure<Dim, Vb, Fcb>::Full_cell_handle
Triangulation_data_structure<Dim, Vb, Fcb>
::insert_in_tagged_hole(Vertex_handle v, Facet f,
::insert_in_tagged_hole(Vertex_handle v, const Facet& f,
OutputIterator new_full_cells)
{
CGAL_assertion_msg(is_boundary_facet(f), "starting facet should be on the hole boundary");
@ -934,13 +942,13 @@ Triangulation_data_structure<Dim, Vb, Fcb>
const int cur_dim = current_dimension();
Full_cell_handle new_s;
std::queue<IITH_task> task_queue;
std::stack<IITH_task, std::vector<IITH_task>> task_queue;
task_queue.push(
IITH_task(f, mirror_index(full_cell(f), index_of_covertex(f))) );
while (!task_queue.empty())
{
IITH_task task = task_queue.front();
IITH_task task = task_queue.top();
task_queue.pop();
Full_cell_handle old_s = full_cell(task.boundary_facet);
@ -1028,7 +1036,7 @@ template< class Dim, class Vb, class Fcb >
template< typename Forward_iterator, typename OutputIterator >
typename Triangulation_data_structure<Dim, Vb, Fcb>::Vertex_handle
Triangulation_data_structure<Dim, Vb, Fcb>
::insert_in_hole(Forward_iterator start, Forward_iterator end, Facet f,
::insert_in_hole(Forward_iterator start, Forward_iterator end, const Facet& f,
OutputIterator out) /* Concept */
{
CGAL_expensive_precondition(
@ -1047,7 +1055,7 @@ template< class Dim, class Vb, class Fcb >
template< typename Forward_iterator >
typename Triangulation_data_structure<Dim, Vb, Fcb>::Vertex_handle
Triangulation_data_structure<Dim, Vb, Fcb>
::insert_in_hole(Forward_iterator start, Forward_iterator end, Facet f) /* Concept */
::insert_in_hole(Forward_iterator start, Forward_iterator end, const Facet& f) /* Concept */
{
Emptyset_iterator out;
return insert_in_hole(start, end, f, out);

View File

@ -6,6 +6,7 @@ Kernel_23
Modular_arithmetic
Number_types
Profiling_tools
Property_map
Random_numbers
STL_Extension
Spatial_sorting

View File

@ -17,6 +17,9 @@ if(TARGET CGAL::Eigen3_support)
include_directories(BEFORE "include")
create_single_source_cgal_program("test_triangulation.cpp")
create_single_source_cgal_program("test_triangulation_static_filters_4.cpp")
create_single_source_cgal_program("test_triangulation_static_filters_5.cpp")
create_single_source_cgal_program("test_triangulation_static_filters_6.cpp")
create_single_source_cgal_program("test_delaunay.cpp")
create_single_source_cgal_program("test_regular.cpp")
create_single_source_cgal_program("test_tds.cpp")
@ -25,6 +28,7 @@ if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("simple_io_test.cpp")
create_single_source_cgal_program("issue_8347.cpp")
foreach(target test_triangulation test_delaunay test_regular test_tds
test_triangulation_static_filters_4 test_triangulation_static_filters_5 test_triangulation_static_filters_6
test_torture test_insert_if_in_star simple_io_test issue_8347)
target_link_libraries(${target} PRIVATE CGAL::Eigen3_support)
endforeach()

View File

@ -0,0 +1,100 @@
4
99
4 0.52895023818873566 0.76946003711969879 0.10332507879995133 -0.34273433572785694
4 0.41163016466811042 -0.3682073981839451 -0.52956435788869938 0.64385208729322574
4 0.093453054760633439 0.2119054808051985 0.80105365911776638 -0.5519743010092597
4 -0.52686178424608165 0.012815670898233643 0.37212064538747264 -0.76405408457574153
4 0.58805166366770167 0.58151399203483489 -0.47736704319070539 -0.29691315902250165
4 -0.25264853451566094 -0.78418366656495475 0.26672951531689387 -0.50008005434994851
4 -0.60084190523524728 -0.5604455825189717 -0.49723069044393314 -0.27865999789869078
4 -0.14100899254743662 -0.0089631723914645051 0.58363636804963048 -0.79962786060221414
4 0.66702813144169226 0.71770163828613143 0.1794509474955823 0.088177024840630905
4 0.067272560205402301 -0.78148557790668927 -0.60747442496113713 -0.12541737194421723
4 -0.61117866728631531 -0.58630168897870427 0.4298657207341281 0.31293198668811495
4 -0.35008556358761689 -0.66710053886097986 -0.65486926625208763 -0.059692657315481151
4 0.46389645798324758 0.47388246271298917 -0.51250089951229549 0.54550739298634399
4 0.60473888028283973 0.43542140981498328 0.61445566011491715 -0.2591202892514034
4 -0.63570028008489909 0.069092069777339338 0.3692217899235456 -0.67437875829500826
4 -0.17348381490574671 -0.72178783898784937 0.63597493154819651 -0.21085911860117806
4 -0.43092415807804269 0.2933088414657809 -0.54542871271981364 0.65633970841595324
4 -0.5872648129848288 -0.46519898124859577 0.20233236501175669 -0.63069133603048011
4 -0.52163736145174866 -0.47914359898299425 0.4166108058131846 -0.56986955627667146
4 -0.12233355367126869 0.84810365508989349 0.2899362015809886 0.42625308313501986
4 -0.35742920641469561 -0.89683785609357769 0.062741086193053408 -0.25296200976145039
4 -0.78852300220962024 -0.5639275096056745 0.02976513928181115 -0.24358012106861993
4 0.16102552058740011 -0.34832861043240554 -0.77230337173088703 -0.5062464448140741
4 -0.36473468498674155 -0.62632680133606067 -0.54342581243374721 -0.423523002771376
4 0.38669371701382688 -0.092732194702578818 -0.68929567367330924 0.60559077233964875
4 -0.33299174094142142 -0.49029782075996031 0.45014108485129106 0.66790534595235718
4 -0.91282645715811384 -0.23702217761885661 0.24831940460126919 0.22114660234209427
4 -0.77031248006615938 0.38630334371017139 0.43488982620221239 0.26126471012839414
4 0.66172375169441366 -0.12261672629530741 -0.32075261333440069 -0.66648674098982941
4 0.57034670408866528 0.48753644666462048 -0.36186729861405409 -0.5532313336232858
4 -0.082725091078310692 0.65143093101200744 0.73450978815824752 0.17114225815572512
4 0.21876173156734111 0.32898578539329398 0.43347340676139118 -0.80994596328489088
4 -0.33699604068423233 -0.65780652131241102 -0.37739592337029015 -0.55793957209137057
4 -0.14452111750932306 -0.29980077878167161 0.44117552773782037 0.83342503763746811
4 -0.60890866237581964 -0.03479345133360897 -0.43514476779108269 0.66232068342460104
4 0.71245784249865418 -0.23592015892187332 -0.54082939892555126 0.37980134614593941
4 -0.60755677753783255 -0.50900445335692879 -0.42092208946750237 0.44115056741317993
4 -0.58629760542664433 0.70435639453918453 -0.22180443664834243 -0.33307653658859659
4 -0.011568009781532355 0.74683659337957264 -0.59111127229640315 -0.30444826769587074
4 -0.73402745671071856 0.45001202934735579 0.34256269222203234 -0.37595700304032337
4 0.96955534991982739 0.21094272681275947 0.1237686011083543 0.012121172646227195
4 -0.33515152801797943 0.58731518520960269 -0.73529604380016256 -0.04554178807703145
4 -0.1695992685331843 0.71732121764303036 0.1045943664094339 -0.66764240229896898
4 0.41021678724271049 -0.058137600323793059 -0.69428206500086809 -0.58848502199375474
4 -0.39592571191104603 0.58200935707952561 -0.50286009397814668 0.50163698508373367
4 -0.45424480336633766 0.10665895997127596 0.74939096527122961 0.469785808685594
4 -0.3454697098753714 0.55281901613449536 -0.74845218643798317 0.12190627373075473
4 -0.59790770721886854 0.60881430552998739 0.02530587143431251 0.52077934665390191
4 -0.56362033043166415 -0.60248915001345682 -0.43114306807172986 0.36531438801922317
4 -0.053942383466521714 -0.3825000007038053 -0.90743388492682919 -0.16537144014049615
4 0.38943960202183897 0.59168265087118188 -0.56545151418878548 -0.4225080142869867
4 0.32757750767416155 -0.37422123516358158 0.86705900240528766 -0.029327972425235223
4 0.30707527803241386 -0.44803155642495435 0.41282918565941928 -0.73112554430585286
4 -0.073800290225580531 0.40020628037959349 0.0842177799924263 0.90955803324499174
4 -0.64001436371529896 -0.072225436170897023 0.49413648819736417 -0.5839471137354828
4 -0.59015206232128126 0.53584682889683521 0.30898692279128281 -0.51876372352268263
4 0.54724228238081274 0.035143265750607743 0.11919629083806163 0.8276974565005436
4 -0.35323392216813781 0.82302655685535431 -0.42310323289497054 -0.13724699360772272
4 -0.41065725894900967 -0.61041191065378753 -0.022994082078545822 -0.67692627899487234
4 -0.70970746461224699 -0.22383791996053623 0.012330134011180993 -0.66787713544982452
4 0.55072527194049248 0.69518182768471604 -0.32858051402398963 0.32474412559234861
4 0.71368785213334873 -0.29618392689360484 0.41394892791451326 -0.48121826258528067
4 -0.19788064543206449 -0.52332638918801311 -0.42611224498755368 -0.7109156737718566
4 -0.73260416198605427 0.61391060086551386 -0.29356437748944109 0.014995741225163756
4 0.06751903424971531 0.71405042477407443 0.5473252660834188 0.4312867074240343
4 -0.18348163268247566 -0.050192144559362807 -0.64188866758252738 -0.74282849805445195
4 0.63687181402246784 -0.22003876193015062 -0.51659922543729686 -0.52830150106692175
4 -0.11028158722874594 0.88420614899701044 0.42720087446642768 -0.15335211263397941
4 -0.013748538374202431 -0.56244270297759258 0.21313224138875758 -0.79877645886720827
4 -0.33934630169439356 0.87504428007586932 -0.32234472481531135 0.1234320615423013
4 0.020641313329517623 -0.034793745494681526 -0.4958497406739199 -0.86746548411570279
4 0.52203848059009927 0.43330117515096306 0.47283390118077567 -0.56227574933491786
4 -0.40054895466475599 -0.79547572989096216 -0.4476148397395544 -0.080123987147080605
4 -0.71649876630467513 0.4523690473971671 0.41922525050126752 0.32594777523862256
4 -0.36070581595586504 -0.41026930366011455 -0.32455192495028179 0.77216349358210712
4 0.7705609584869002 -0.4953157763775814 -0.39996122520888822 -0.030481293552415547
4 0.28303350219616347 0.63943282663784418 0.11251583685128733 0.70594467439748088
4 -0.40169841911732779 0.38324938887974475 0.68336451387909214 0.4741004399626032
4 -0.62006911748363935 -0.55619344959426886 -0.52050366542307425 0.18772072462206343
4 -0.49268718648182941 -0.31898831529416238 -0.80785558586700856 0.053620363350908903
4 -0.36696017144017445 0.25428710781938241 -0.75112771736490647 0.48629769851361304
4 -0.6762857935197728 -0.60184509135112363 0.12406042037932141 -0.40623764423695996
4 -0.3666763716786815 0.59232631101849398 0.084652342433469516 0.71241277406311754
4 -0.76719307170352091 0.45208369346607641 -0.34422833381589385 0.29756004273174891
4 0.82489704276678244 0.34579891834392634 0.064163335194787313 -0.44255061103049992
4 0.45564567873025064 -0.22926076391181213 0.74158978325192637 -0.43574202340534296
4 0.52214745052855083 0.27359451350772929 0.80769505426164601 -0.011695358322007989
4 -0.41332356519969343 -0.4212363812082196 0.33906221189151459 0.73263930966366508
4 0.1838662558741771 -0.35081918453578126 -0.0091141922386424549 0.9181699359118104
4 0.65789904901077378 -0.64943157580971833 0.27398923148746029 -0.2652119354043791
4 -0.37303592269023383 0.60300377304686248 -0.10667396639645926 -0.69703035440871652
4 0.10315594841993071 -0.82693376104025118 0.4808678171094436 -0.27259043935143445
4 -0.89464835998641834 -0.023071055052995115 0.22497109841239393 0.38530513008714889
4 0.2653611823080248 0.61537576292522267 0.13785152217861019 -0.7293099966141473
4 -0.21380924996700196 -0.13124084180973827 0.96126618299929023 0.11414364411387168
4 0.87240111990088531 -0.36008466117017685 0.27199676339958556 0.18781129754567474
4 -0.44220740212185472 -0.70374614146887182 -0.24198731969355564 -0.50063571485047287
4 0.63576818856786788 0.49539717675654271 0.44626626174819567 -0.38887899312262875

View File

@ -0,0 +1,100 @@
5
99
5 -0.64095941196659478 0.42422061910202236 -0.11427904012605219 -0.54638535945002176 -0.31242797331012567
5 0.44732454860440324 0.49607483933338892 0.47235547227129621 -0.45736405185315043 -0.34858131602833875
5 0.049977903241973112 -0.41566435029188453 0.47034156364498109 0.5314014231286428 0.56667159633142805
5 -0.31858406166597525 0.55293922510375226 -0.098876917441046278 0.66185744478651076 0.38069736927394077
5 0.1883028908220821 0.1625166528920311 -0.90658142749714132 0.11334777454589573 -0.32154743998911944
5 0.32925500379336742 0.6048540056497308 -0.086063069913405219 -0.69326730751901255 0.19420700978318073
5 0.43778721990629893 -0.33151202897445026 -0.41155460656703702 -0.59664728782302312 0.41602517289082297
5 0.62257265376051363 0.69293819835728199 0.30234871432571214 -0.053274980604846874 0.19490247672643263
5 0.44105487515035374 -0.42039030928286697 -0.48068520779332113 0.34447782922782266 -0.52822281392073556
5 0.016084439725856742 -0.25191131235609143 0.7629458374992345 0.52353744836895799 -0.28302680209416425
5 0.43354106860716723 -0.22705781874127151 0.068849436504207148 0.73368495821250479 0.46631858848343127
5 -0.64456383107308368 0.37500823725746141 0.15272334561406656 -0.44653621962219042 0.47030551127050385
5 -0.01363735448457239 0.30485208355187349 0.43905750564271206 -0.62699965173691685 0.56655023888206812
5 0.0078606115325960974 0.13430751581905762 0.2181755898170861 0.53805349733372398 0.8029928692060484
5 0.52338099659430393 -0.014615020320186925 -0.48914523816770017 -0.47549568516135032 0.51039153887559274
5 -0.69482670411781933 -0.030010825193797691 0.34327877508094107 0.56440594895759255 0.28270268653863861
5 -0.75400593882254485 0.20528914441943982 -0.011183249996636422 0.28305090197467592 -0.5559573124033016
5 -0.26478115474184827 -0.45814239612429802 0.058790619333674764 -0.82550288646510983 -0.18731025728238973
5 0.75370149289146393 0.041265752398890396 -0.31598075959816507 -0.50970148811628602 -0.26569107976735346
5 -0.4519268127481933 0.17613049993809574 0.64157833191917701 -0.1199529988420301 -0.58200405925682863
5 -0.67422492315129878 0.0052508128669294055 -0.34989951630863758 0.59640231454536097 -0.25936034711917605
5 -0.84536670492017962 -0.023545078714723985 0.23188336199914605 -0.39941072573741931 -0.26739847059135646
5 -0.6832142989651836 -0.12691169799999982 0.57357419956766675 -0.1281663346418801 0.41436417660681707
5 0.63151709095033293 0.11572773552335802 -0.45061917023719628 0.14637578686667163 -0.6027518125249961
5 -0.63457899564060283 -0.52966844727893914 -0.51456049526593051 -0.21838548693858054 -0.06554471798063273
5 -0.72586407046590262 0.53323169069976017 0.32142119181324058 -0.28443313725001818 -0.067613039627090948
5 0.11048228638172189 0.12809754988080219 -0.40887921694271862 -0.77092857165846906 0.45811745815166749
5 0.51397355334880024 0.32553149207748472 0.5186652471029648 -0.19028592634504338 -0.56977018332521023
5 0.52471838621722444 0.20265571519982001 -0.5961767637385692 -0.2552020089464791 -0.51288056823234041
5 -0.42618238121168606 0.67925070936879339 0.11809074419895899 0.5837804744939592 -0.047349609300101507
5 -0.75979859206098521 -0.17280413824019189 -0.1813534331371959 0.59978037174150067 -0.014807676123859496
5 0.39184709577815358 -0.46011983815751623 -0.55867615995912812 -0.43478136258019162 -0.36550198783366711
5 -0.47631197080770421 -0.13866838726394107 0.56944074766219055 -0.20924017616748669 -0.62117128750307116
5 0.69836618593825928 -0.31047848566369102 0.30402750685925439 0.12607668433628302 -0.55458067494075669
5 0.1869131312461339 -0.14541256019221543 -0.88720967185608168 -0.37122076821132544 0.13774181688843901
5 0.066168156653027055 -0.79153357077416386 -0.0022462197273692267 0.46469566632383441 -0.39134291047548841
5 0.89469701530926082 0.11759766993898985 0.34387377605733604 -0.10906814641318215 0.23567563386927023
5 0.44839548790055422 -0.215872738581219 -0.31689404873737492 0.48576723561113194 -0.64494092896126687
5 0.6459123373501775 -0.46663502702373549 -0.32530950233450889 -0.039516958959050295 0.50760333101634691
5 0.050417291553477184 -0.047285079262706954 -0.2138273059584746 -0.90923374708311278 -0.35041988297366083
5 -0.59264984179337254 -0.45580598211515067 0.41834884196290151 0.32848532800592428 0.39760370647602505
5 -0.13481014216375148 0.098149972390238663 -0.71288083854571282 -0.46824774456146634 -0.49470978182874609
5 0.020717171016991894 -0.61151395060645808 0.18739980633705816 -0.63488453348310792 0.43292543095492175
5 -0.29319280111406504 -0.71141445302303752 0.43866572973669665 -0.42414838726394366 -0.18867427100902645
5 -0.12195022572923944 0.1597275130261441 0.37359538094266925 0.87248224896209947 -0.24252109312678227
5 0.26916794620313855 -0.79643329338601399 -0.17842819374734853 0.24827897357108525 0.446949165880907
5 0.1453113711518611 0.55890701106684326 -0.33506119215671726 -0.56060928342351557 0.4898558841579691
5 -0.13559765406608318 0.22424015035632619 0.89051035130708844 -0.2844260176919719 -0.23963051945601349
5 -0.50566728258429727 -0.35078461251646564 -0.44622952634161051 0.39434995372518228 -0.51635073231610096
5 -0.081206578882796046 0.7080562679527399 -0.42730522360386669 -0.31493163319195694 -0.45857401284294996
5 -0.56221514665255945 0.26352028510021092 -0.32431871644229199 0.44640018134880266 -0.5567902984716282
5 0.67127300073285578 -0.56121759668984272 -0.11438199626517255 0.32066898964093893 0.34426083957638576
5 0.46427394220581342 0.46813361706404572 0.43431336049942787 -0.029219081499168249 0.6130405968051752
5 0.085830281871806843 -0.68075675673231806 0.36464348542014058 -0.55908690912039871 -0.28924100239757228
5 0.41364898446754872 0.44051277392034793 -0.51368389933707281 0.27089667753848867 0.54551522006487996
5 -0.12351866879421199 0.37823568590421885 0.070649994572097946 -0.14105158010103419 -0.90376652648006106
5 -0.55545110175425316 -0.57820471208033508 -0.43080087411301676 -0.38794497232024833 -0.14512990664568667
5 0.7651360106358821 0.26858554943456936 -0.32320967256616323 0.45271513727326118 0.18169534916024627
5 0.45441543922986888 0.5544933959770898 0.37209878757560882 -0.34801976791573092 -0.4758869780020909
5 -0.48382144387953951 0.21412341598565873 0.48837003184817313 0.56894254401428956 -0.39732488818612011
5 -0.27038670992649089 0.7177459738405968 -0.024815590179790174 0.61932329771149031 0.16599573345882931
5 0.52568529402156838 -0.6686179658279312 -0.30453683091328215 0.39362339728539719 -0.17006741942057541
5 0.15294938992472662 -0.23462980298095978 0.2749232088212652 0.63828078540744748 0.66224633476210426
5 -0.53568255103656881 0.078022991883987841 -0.31948842617438705 0.62671984273267689 -0.46054967323641327
5 -0.23310206113273735 0.38122357958778275 -0.62218473180664657 -0.51308258950399432 0.38725240776077069
5 0.062519229350989067 0.60935859588898855 0.36557460415396498 0.64016700136989868 -0.28515761734925249
5 0.40055103808277742 0.11420518938708622 -0.13612792768426063 0.2722551771516088 -0.85665765999400478
5 -0.55472894977000109 0.14438622704861134 0.35711517550786664 0.19748727548511219 0.71056029805301646
5 -0.039226168712433881 0.53046963553531501 0.58724338979502344 0.3304297025089995 -0.51285932408901158
5 -0.36549272643511066 -0.1944460632762828 0.42892482070515675 0.54746427240095541 -0.58729223051810131
5 -0.51444905998852453 -0.54308624712485065 -0.44536997670499018 -0.057662778907800395 0.48858989002966047
5 -0.15440932419624182 0.48219819045804607 0.047093757444803284 -0.60392043033692211 0.61376294898897477
5 0.43481889665508638 0.21724186040536617 0.41122418484105694 -0.036198505808205945 0.77027452195845758
5 -0.45335160348155307 -0.0090240382671407781 -0.54837361755857228 -0.56749016125780805 -0.41428514672308675
5 0.47114542832518985 0.46505950774730731 -0.62278318402538824 0.41519154489887244 -0.038713387371715736
5 -0.50136442182277852 0.18939946722006479 -0.44745642645398664 -0.036410595617002037 0.71499550578930915
5 -0.50890485936191909 -0.54100797605641604 0.44170900156992093 -0.27187048708488765 -0.42344516781455299
5 -0.18074952593523871 -0.18860582205590692 0.57887192516180996 0.039211533315703977 -0.77144487986847987
5 -0.47365805515360904 0.01465502819126422 0.85229770070622901 0.15425760518747605 -0.15882851617236068
5 -0.30745671248873752 0.57057989273713283 0.60645536747604767 0.19965378698854283 -0.41504121307446745
5 -0.24028271704320009 0.58912913017564106 0.73907633222396696 0.20948416633465156 0.071229509827560183
5 -0.64228704065956665 -0.37111771514629771 -0.51078840781267765 0.2517172542564432 0.35422115303741308
5 -0.45413924048414522 0.52788021885267411 0.39677332786249203 0.39688971574050569 -0.44738071553530406
5 0.41505598340153971 -0.22025041501083814 0.80109954759996271 0.34641357884080504 0.13211900907884189
5 -0.20025735851245358 -0.6592702299950165 -0.32273296816240932 -0.32053493269293298 0.56423447465442167
5 0.58716421726361867 -0.17367850226005824 -0.3234252705857012 -0.576311210468198 -0.43397631600486125
5 0.24500268030283279 -0.37673527821663111 0.26197175324156724 -0.831532046129559 0.1948575724846065
5 0.5221610049491775 0.15958174522100452 -0.48361390102525659 -0.55613903653367458 0.39838237697118678
5 0.16962234853857569 -0.58401971243880413 -0.62282869411315633 -0.32534521602588351 -0.36930223741202295
5 0.58028138836141019 -0.34025869019701482 0.5807426490215255 0.41704964830718566 0.19053897375886178
5 0.49658935038669683 -0.1325969999793061 -0.64242700913886752 0.43871198504738879 0.36143655706593286
5 0.6541749555201487 0.11495532575987849 -0.47189266545231384 -0.46477475130993412 0.34661526724417524
5 -0.37016121969427745 0.68870175579814763 0.23906708910490926 -0.55701266918805681 -0.14578880706657554
5 -0.61783888880336935 0.32189539528913458 -0.46086045339499304 0.38667673368942418 -0.39082887315768933
5 0.032116226250772636 0.37788382751053184 0.37339170905185354 0.24931481645654946 0.80906928926017996
5 -0.062201604939676421 0.48158547236711069 -0.55318649438944401 -0.64020204958944993 0.21984638108110963
5 0.43963286001154867 -0.58237961543813122 -0.68268015123007919 0.016241394588271955 0.03522726413596125
5 0.36598575138692213 -0.072439024911306132 -0.56340774519713788 0.68450645966869139 -0.27355006264916204

View File

@ -0,0 +1,100 @@
6
99
6 -0.52248578532016376 -0.48346324138645691 -0.58974456741264414 0.22252777840028556 -0.015931087719839573 -0.30935551046981807
6 0.34754132905984381 -0.074985127922628902 0.49930955656743814 -0.49297991574953459 0.3743412038014835 -0.49104143176539627
6 0.49995311666702108 -0.57210736482775315 -0.25164036633515868 0.10175875354232455 -0.17957742984389918 0.56286257029905196
6 0.39906582656602591 0.47457715471780493 -0.082408075327093433 -0.15562564967545028 0.36076517581009854 -0.67406308643465562
6 0.47762233059349435 -0.2842328008690938 0.38623842606683151 0.25571542872305203 -0.48436897768414289 -0.49183820045637949
6 -0.0042314478443558987 0.66049090972627666 0.47606918346155225 0.26460949335869488 -0.47947866280804441 -0.19280563662043465
6 -0.38374085169832239 -0.58506782737244056 -0.28816302750472883 0.3515802173604044 -0.5279113747823817 -0.15843483463882974
6 0.23917340386004574 -0.54065741121454236 -0.33612792325867147 0.0073138842190205713 0.49193768445111852 -0.54355081409662509
6 -0.33027866095233116 -0.56180392557603231 -0.32646623884361697 -0.56886147641690643 0.33908986323916374 -0.17357083718015598
6 -0.39192523875775492 0.54423469918164857 0.43041308504361298 0.45346132108040205 0.22340600649055789 0.33077237218748201
6 0.066836254602841441 -0.52920520249210112 -0.33068598406842653 -0.26992400905794661 0.62845484338677204 0.37189660905209698
6 0.19743860684640982 0.081543364953937478 0.63446506243002354 -0.097012508529634223 0.70768239786789711 -0.2039533222355914
6 0.42350956524488981 0.53817080890286528 -0.44826665925687231 -0.4630016158560194 0.23378709098204101 0.24706665212948764
6 0.09785501454807044 -0.11456262890775261 -0.31134303673278318 -0.49637806372022192 0.55949777724624261 0.56651246127285459
6 -0.10326273668695649 -0.65814304095940668 -0.31725909306625727 -0.555960810177341 -0.25255650990838052 -0.28749608617380074
6 -0.61542480481483819 0.0011280450683139097 0.55328692027642723 0.34400335684157046 0.37016000457099912 0.24447470724330039
6 0.43813574182814297 0.29379416544186204 -0.55292433586480871 -0.36707484188102968 0.413424369672585 0.33216425140632733
6 0.62368126529536638 -0.3064881542207466 -0.43871298975197703 0.53742069886050947 0.15085507286218508 -0.11418994129448788
6 0.16476372090864744 0.1109205078824663 -0.23399740855607967 -0.44517529682570806 -0.76827227146836241 0.34259515755693032
6 -0.4582030961925827 -0.2663673224056024 -0.54961052165427071 0.51751923392842392 0.35978158750630773 -0.14056208054272484
6 -0.11495774297936535 0.17677227221875624 -0.45880764506787858 0.44376921050871543 0.46355481773156476 0.57725007119384819
6 -0.52160176513875189 0.31426462456544085 -0.35933189154758549 -0.51331867425419864 -0.43205016526292017 0.22335292571602985
6 -0.20947455578544788 0.47005432960768112 -0.41475967751478227 0.40696776076920221 -0.54940083105174653 0.30932138002011456
6 -0.35515545955131517 0.28659947063783103 -0.43389023672403004 -0.75423410037367455 -0.13058245691460899 0.1324528189063271
6 -0.1072324954411312 0.53549378529716085 0.5303451149630013 -0.13897402329310882 -0.090546592722667144 -0.62687254865762698
6 0.1102357638392452 0.35390965540162767 -0.15921053186861117 0.56662571537935513 -0.50343143562548798 0.51258182470829694
6 -0.7521414280651405 -0.34476026492334633 0.19505386347651005 -0.49783859325421242 -0.1655035063064634 -0.04629197260795017
6 -0.43546464287814302 0.23273923325366619 0.0044777062314122424 0.67556119443422513 0.50870812033248003 0.20252423345567822
6 0.53251647928358914 -0.39729448899929043 0.58369316051078268 0.22564615748686082 0.37811475342857548 0.15491490414482306
6 0.24289310169624273 0.11859386955210122 -0.29281369162847548 0.59092439680912245 -0.63259583083229609 0.30303374286919554
6 -0.35598184358712603 0.77960773923442395 0.26584688554881319 -0.18885184748169259 -0.1277532527817529 0.37792620908390379
6 -0.57775461906181802 0.56398136201948956 0.24716950956221539 0.26633847280431333 -0.37362408068361069 -0.27658763751791582
6 -0.57990647596989886 -0.28836767266607671 0.22685410250953331 0.14944399270179443 0.64174541296874976 -0.30808943286460289
6 -0.5335030315141126 0.54805489620934245 0.42406328570339591 0.093393095662535883 -0.12783094169714468 0.45838592457889477
6 -0.12909382114378909 -0.56639935858156654 -0.58803157227785718 0.43124035398267208 0.24059819736254101 -0.26998090019131404
6 -0.43975002441797462 0.42549076003343606 -0.10026091502860482 -0.74594444050366826 -0.23934857461929585 0.042478577866581706
6 0.96344235807064582 -0.019659692709547497 0.15982487206874871 0.15259660437219755 0.14992374705924039 -0.0092453138313178737
6 -0.084430753927450891 0.54594301169552162 0.53653011372194326 -0.41453990405074331 0.43836397417083728 -0.20723611398676234
6 -0.15115603394306507 0.55281885912085593 -0.15786414392716869 0.45384926769871159 -0.57847546467799149 0.32559031533506255
6 0.54204921011102858 -0.48557698424209411 0.063433639091453539 -0.57195606016163636 0.24305832909277175 -0.28313024127949815
6 -0.20964859633944177 0.64422189446086331 0.49286994349553021 -0.016379507018461248 -0.25142041984651609 -0.48438034619801107
6 -0.66412915962225783 -0.078748905511993067 0.26534993875875773 -0.46284549334831837 0.1802169516138587 -0.4854033156654165
6 -0.025354298800610967 -0.39942902492434534 -0.29081623107075677 0.51367327514162064 -0.4798586670872439 0.51099408935197155
6 -0.45624010445234175 0.49728960762817503 -0.71376636112381542 0.14604468681390875 0.086243214125533443 -0.079489951774571604
6 0.042777457242166465 -0.45576092006574703 -0.552753958269535 0.42815940751197412 0.21138424160935149 -0.50686424086565252
6 -0.69726903180472077 0.58427371427586983 -0.26549450486140008 0.04515354794769965 0.28681486789955868 -0.13285774587986951
6 0.43703961063496144 -0.10262789880626823 -0.30317985370822126 0.4423049505563586 0.66160948460225333 0.2705274293408918
6 -0.44503643360426454 0.44210396394781937 -0.30552946308447798 -0.087224327910949404 0.29239336350668083 0.64810218531607033
6 -0.33416852970579863 0.43114438367926067 -0.37015382974558247 0.4394289146016731 -0.4941491374465089 -0.35798172505540032
6 0.58427360418679308 0.13212854546799202 0.32961365957906164 -0.15457700371906985 -0.52591774988985029 -0.48170292568554879
6 -0.14692240259726411 0.50795249686667387 0.32018789462677638 0.58144701994589676 0.41352260304947402 -0.32984269044448206
6 -0.30224776324831804 -0.54016932402525564 0.062437141365121823 0.29982639105377751 -0.48343582303649113 0.53792093713141187
6 0.62544035465474512 0.14389245436402084 0.11513839092542102 0.44236996603616979 0.59184763957735986 0.16996370188194654
6 0.16399979716296756 -0.54611276403195308 0.31075827322246652 0.30247091078354782 0.69596494174650481 -0.049379743875720375
6 -0.11219854773022092 0.61621528084473354 -0.20736244405315685 0.59256100282170987 -0.26794828151981021 -0.37651853434125537
6 -0.46302684227036922 -0.25443861931412992 0.32594642236734189 0.11169860998106729 0.43606185210305048 0.64187190603214217
6 -0.45102710013912661 0.34319441954205482 -0.47602676819679662 0.40310344265859838 0.43758453310888407 0.31339759443247434
6 -0.51942334686053926 -0.37233703787629813 -0.51991348946415983 -0.3753013101271776 -0.41630361563609058 0.084230081681330463
6 0.58470861285556364 -0.27462643035008216 -0.26429262032141643 -0.3765127120977812 -0.28781649242151536 0.53688491966927399
6 0.50045126191095868 0.7871626075227196 -0.21282467832228918 0.28028649755337315 -0.043024392064293426 0.064943060010571332
6 -0.69508790074194882 0.43616299845857603 -0.3591724438510307 -0.049576650667123003 -0.090986178416972305 0.43228864852267174
6 0.27823226432546638 -0.072653878980126624 0.44563536030377265 -0.1696865917185551 -0.48061373991631517 -0.67744685415092498
6 -0.30768510623989498 -0.50822449378663159 0.18610948363783017 -0.71726533661442327 -0.23675331849272591 0.20464433167719714
6 0.46757798287119678 -0.13228547514553321 -0.69909562048719887 0.51494410224708809 -0.069923553034947503 -0.071273871139087508
6 0.30979245895544522 -0.27528069259249532 0.40534747257084985 0.38280137237753259 0.7111072591652291 0.108315162414837
6 -0.75447113237181862 0.22335469077359976 -0.078453049118816759 0.57794290835632367 -0.089983576170946739 -0.18059917583172225
6 0.53097636282674088 0.47993989234775414 -0.14341376704799877 0.37633704676626029 -0.27087538177519738 -0.50214663998975873
6 -0.54501406879560677 -0.027692701375586291 -0.018425467843559137 -0.18240602791855356 0.27664238093066079 -0.76944805886565038
6 0.0049593326721196094 -0.55640609995536572 -0.090097818767519516 0.52601054123491187 -0.32750199904052951 -0.54619171646909292
6 -0.5246820629099288 0.15438725569802475 -0.40052392363106931 0.61912072585885058 -0.28944503954220524 -0.27085972501316796
6 0.23252207147619353 -0.088889793755518587 -0.43408635618399199 0.060187728890766561 -0.74515951113397694 -0.43671027750096514
6 -0.082635336835963871 -0.49519261695606376 0.15854845703115641 -0.56216663205680517 0.38233422075054319 -0.51049709248558417
6 -0.63625730633727418 0.25866481089124316 0.44123359845324261 -0.49027168711023134 -0.27636701110074274 -0.1297575251319382
6 -0.44887073462772731 -0.49904555043438975 -0.30600411449649562 -0.21972017202857003 -0.37941072591180663 0.51342052078625433
6 -0.34623422926080971 0.11834562879027813 -0.58051057852027854 0.45782288815419275 -0.27114225180370755 -0.49598762205263436
6 0.18476465374966927 0.16780923027338854 -0.42003736535999353 0.32891322320538224 0.44078292065455432 0.67734570576710706
6 -0.58826517628267483 0.13974808135952232 0.62318859849813157 -0.12874611043451153 0.46759218180316064 0.10407938026297492
6 -0.31641160184325334 0.54818645501247232 -0.1073258390615717 -0.28649693243150826 -0.24692955978787859 0.666934609418251
6 0.10226792288332755 0.60622551567028793 -0.53017506565965233 0.071605228794985001 0.40996565618803915 -0.40956946640067621
6 0.46043313457149759 -0.074442042067401834 0.30689113367015464 0.11103519893154284 -0.70251964235567732 0.42710054991633023
6 -0.064156465396957033 -0.82837155645765004 0.49937300767398479 -0.21915544003533366 -0.10694135232173688 -0.029078374659791989
6 0.0042208998272006927 0.36747111488458412 0.76684135998135416 -0.29458715192078899 -0.43565218876602341 0.018085151330519758
6 0.65851529280804311 0.5194851618852423 -0.41811762733101349 -0.12994527743920986 0.1772560295364389 0.27085965055413574
6 0.12993326316132806 -0.51206545526523228 0.39669591115833769 0.14384532909354469 -0.65561573013643804 0.33617734369548297
6 0.16664316396641046 -0.13200053855335347 0.33194364778908209 0.60516407129239946 0.65067562957865477 -0.23455702996626543
6 -0.54726594996923195 -0.092098298754806088 -0.31987289797771662 -0.4279187441318057 -0.62561590332491124 -0.12324569946937439
6 -0.11298168347438495 0.36544841132413869 -0.60324357694674791 0.55848239564997726 0.23122326525371081 -0.35272227047200261
6 -0.58723545016046963 0.58944372207482276 -0.22662085714400246 -0.027374002377005865 0.20652708682257323 0.46146596634115078
6 0.25382119670786951 -0.49035434210113238 -0.46264611340318978 -0.44845091744845272 -0.46735464124745502 0.24810765200085477
6 0.59601104905273994 -0.4194785680875594 0.33460981878342455 -0.16429160937140283 -0.25171322089750281 -0.51623013376937443
6 0.41563033855507381 -0.48609408425483569 -0.08739976523333666 -0.061961248085371137 -0.58592390826984109 -0.48598273777543055
6 -0.031533077985587805 0.13928846673339906 0.58357639428533792 0.48352257655397113 -0.11733201912831731 0.62568530053903204
6 0.16248922520275433 -0.47085387551133417 -0.66619299328217085 0.14775302067779422 -0.48370792262089657 0.22864047276252492
6 0.10089789149314744 0.18194720556532579 -0.66592379404892899 -0.44749698377552732 0.46944144644050056 -0.30435424799785848
6 -0.16137300109253624 0.4975763651263943 0.040717095122033017 -0.55028097459815839 -0.4278321603812576 -0.48874239133681002
6 -0.046330434202731273 0.36620529921638473 0.42638300010025254 -0.29858665784419686 -0.55582640196409261 0.532773615670874
6 0.58075496826088835 0.62077282856651106 -0.01995679162257755 -0.40908951563845819 0.11026240062152064 -0.31217696876264217
6 -0.2011053790337092 -0.462204381963504 0.52235264924999425 -0.52403901785865747 0.0083805492421482313 -0.44540354712899355

View File

@ -0,0 +1,64 @@
// Switch off the static filters for 4, 5, and 6 points.
// #define CGAL_NO_STATIC_FILTER_456
#include <CGAL/Epick_d.h>
#include <CGAL/Triangulation.h>
#include <CGAL/algorithm.h>
#include <CGAL/Timer.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <vector>
typedef CGAL::Epick_d< CGAL::Dimension_tag<4> > K;
typedef CGAL::Triangulation_vertex<K> Vertex;
typedef CGAL::Triangulation_ds_full_cell<void,CGAL::TDS_full_cell_mirror_storage_policy> DS_full_cell;
typedef CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data, DS_full_cell> Full_cell;
typedef CGAL::Triangulation_data_structure<CGAL::Dimension_tag<4>,
Vertex,
Full_cell> TDS;
typedef CGAL::Triangulation<K,TDS> Triangulation;
int main()
{
const int D = 4; // we work in Euclidean 4-space
std::vector<Triangulation::Point> points;
std::ifstream in("data/points_4.txt");
Triangulation::Point p;
int d;
in >> d;
assert(d == D);
int n;
in >> n;
std::cout << n << " points in dimension " << d << std::endl;
points.reserve(n);
while (in >> p) {
points.push_back(p);
}
CGAL::Timer timer;
timer.start();
Triangulation t(D); // create triangulation
assert(t.empty());
//std::array<double, 4> ar = { 0, 0, 0, 0};
//Triangulation::Point orig(ar.begin(), ar.end());
//t.insert(orig); // insert origin
t.insert(points.begin(), points.end()); // compute triangulation
std::cout << "Time taken to insert "<< points.size() << " points: " << timer.time() << " seconds." << std::endl;
timer.reset();
assert( t.is_valid() );
// - - - - - - - - - - - - - - - - - - - - - - - - STEP 2
typedef Triangulation::Face Face;
typedef std::vector<Face> Faces;
Faces edges;
std::back_insert_iterator<Faces> out(edges);
t.tds().incident_faces(t.infinite_vertex(), 1, out);
// collect faces of dimension 1 (edges) incident to the infinite vertex
std::cout << "There are " << edges.size()
<< " vertices on the convex hull." << std::endl;
std::cout << "Time taken to find edges: " << timer.time() << " seconds." << std::endl;
return 0;
}

View File

@ -0,0 +1,64 @@
// Switch off the static filters for 4, 5, and 6 points.
// #define CGAL_NO_STATIC_FILTER_456
#include <CGAL/Epick_d.h>
#include <CGAL/Triangulation.h>
#include <CGAL/algorithm.h>
#include <CGAL/Timer.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <vector>
typedef CGAL::Epick_d< CGAL::Dimension_tag<5> > K;
typedef CGAL::Triangulation_vertex<K> Vertex;
typedef CGAL::Triangulation_ds_full_cell<void,CGAL::TDS_full_cell_mirror_storage_policy> DS_full_cell;
typedef CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data, DS_full_cell> Full_cell;
typedef CGAL::Triangulation_data_structure<CGAL::Dimension_tag<5>,
Vertex,
Full_cell> TDS;
typedef CGAL::Triangulation<K,TDS> Triangulation;
int main()
{
const int D = 5; // we work in Euclidean 5-space
std::vector<Triangulation::Point> points;
std::ifstream in("data/points_5.txt");
Triangulation::Point p;
int d;
in >> d;
assert(d == D);
int n;
in >> n;
points.reserve(n);
while (in >> p) {
points.push_back(p);
}
CGAL::Timer timer;
timer.start();
Triangulation t(D); // create triangulation
assert(t.empty());
//std::array<double, 5> ar = { 0, 0, 0, 0, 0 };
//Triangulation::Point orig(ar.begin(), ar.end());
//t.insert(orig); // insert origin
t.insert(points.begin(), points.end()); // compute triangulation
std::cout << "Time taken to insert "<< points.size() << " points: " << timer.time() << " seconds." << std::endl;
timer.reset();
assert( t.is_valid() );
// - - - - - - - - - - - - - - - - - - - - - - - - STEP 2
typedef Triangulation::Face Face;
typedef std::vector<Face> Faces;
Faces edges;
std::back_insert_iterator<Faces> out(edges);
t.tds().incident_faces(t.infinite_vertex(), 1, out);
// collect faces of dimension 1 (edges) incident to the infinite vertex
std::cout << "There are " << edges.size()
<< " vertices on the convex hull." << std::endl;
std::cout << "Time taken to find edges: " << timer.time() << " seconds." << std::endl;
return 0;
}

View File

@ -0,0 +1,83 @@
#include <CGAL/Epick_d.h>
#include <CGAL/Triangulation.h>
#include <CGAL/algorithm.h>
#include <CGAL/Timer.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <vector>
typedef CGAL::Epick_d< CGAL::Dimension_tag<6> > K;
typedef CGAL::Triangulation_vertex<K, std::ptrdiff_t> Vertex;
typedef CGAL::Triangulation_ds_full_cell<void,CGAL::TDS_full_cell_mirror_storage_policy> DS_full_cell;
typedef CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data, DS_full_cell> Full_cell;
typedef CGAL::Triangulation_data_structure<CGAL::Dimension_tag<6>,
Vertex,
Full_cell> TDS;
typedef CGAL::Triangulation<K,TDS> Triangulation;
int main()
{
const int D = 6; // we work in Euclidean 6-space
std::vector<Triangulation::Point> points;
std::ifstream in("data/points_6.txt");
Triangulation::Point p;
int d;
in >> d;
assert(d == D);
int n;
in >> n;
points.reserve(n);
while (in >> p) {
points.push_back(p);
}
CGAL::Timer timer;
timer.start();
Triangulation t(D); // create triangulation
assert(t.empty());
t.insert_and_index(points.begin(), points.end()); // compute triangulation
std::cout << "Time taken to insert "<< points.size() << " points: " << timer.time() << " seconds." << std::endl;
timer.reset();
assert( t.is_valid() );
std::vector<Triangulation::Full_cell_handle> infinite_cells;
t.tds().incident_full_cells(t.infinite_vertex(), std::back_inserter(infinite_cells));
return 0;
std::set<std::pair<std::ptrdiff_t, std::ptrdiff_t>> edges;
for(auto ch : infinite_cells) {
std::vector<Triangulation::Vertex_handle> vertices;
std::cout << "cell" << std::endl;
vertices.reserve(D);
for(int i = 0; i < D + 1; ++i) {
if(ch->vertex(i) != t.infinite_vertex()) {
vertices.push_back(ch->vertex(i));
std::cout << ch->vertex(i)->data() << " ";
}
}
std::cout << std::endl;
for (int i = 0; i < D-1; i++) {
for (int j = 0; j < D-1; j++) {
if((i != j) && (vertices[i]->data() < vertices[j]->data())) {
edges.insert(std::make_pair(vertices[i]->data(), vertices[j]->data()));
}
}
}
}
for(auto pair : edges) {
std::cout << "edge between vertices " << pair.first << " and " << pair.second << std::endl;
}
std::cout << "Time taken to find edges: " << timer.time() << " seconds." << std::endl;
return 0;
}