Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Apollonius graph -- how to assign additional information to sites?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Apollonius graph -- how to assign additional information to sites?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Apollonius graph -- how to assign additional information to sites?
  • Date: Mon, 07 Oct 2013 07:32:42 +0200
  • Organization: GeometryFactory

On 10/06/2013 09:11 PM, Stefan Salewski wrote:
On Sun, 2013-10-06 at 17:11 +0200, Stefan Salewski wrote:
I guess it may be
problematic due to rounding -- I may use two doubles to create a site
and as keys of my hash entry, but may get back a rounded double value
due to CGAL's intern exact arithmetic?

Or in other words:

double x = 3.14; // double constant
p = Point(x, x);
s = Site(p, 2);
h = ag.insert(s);
Point pp = h->site().point();
double xx = CGAL::to_double(pp.x());
assert(xx != x);

I think the assert() is never executed, because CGAL::to_double() always
returns the exact initial value?

I still wonder how serious arithmetic errors are for apollonius graphs?
May I get small errors when I would use plain double data type, or may
the whole graph generation fail?

The whole generation might fail.
See also http://www.cgal.org/FAQ.html#inexact_NT

Sebastien.

Best regards,

Stefan Salewski







Archive powered by MHonArc 2.6.18.

Top of Page