Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] point lying over a line problem

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] point lying over a line problem


Chronological Thread 
  • From: Sylvain Pion <>
  • To:
  • Subject: Re: [cgal-discuss] point lying over a line problem
  • Date: Wed, 23 Jul 2008 18:54:34 +0200

Alejandro Aragon a écrit :
Indeed that made the difference, using simple cartesian gave:

$./a.out
Time: 1.5705sec
Measurement granularity: 1000000 of a second
Time: 1.56849sec
Measurement granularity: 1000000 of a second

so I guess it's the same. Now, why would you use reference counting for such a small type??? Let's say you use double precision Point_2 types, you would need 64 bits to represent the x and y coordinates and then half of that to keep track of the storage???? Isn't that something silly to do? I would expect using reference counting in objects that require a large amount of storage (the std::string class for example, even though I believe that even that class is not using reference counting). If you allocate 100 different points, 33% of your memory goes away in using pointers!!!

I guess that Cartesian uses objects that really need reference counting, but I don't think that the Point_2 should be one of them. Then users of the library who didn't bother to go over the entire documentation (like me) think that Cartesian is their best candidate, when it is not.

Historical artefact, I owuld say (like many things in CGAL you may find
strange).

Had you gone a bit at the documentation, you would not have used Cartesian
or Simple_cartesian at all, maybe.

Also, keep in mind that the primary goal of CGAL's kernels is to support
the higher level geometric algorithms, which have specific requirements
e.g. in terms of robustness.

We still don't know what you do with your points :-)

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/



Archive powered by MHonArc 2.6.16.

Top of Page