Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature
  • Date: Fri, 26 Feb 2016 07:20:06 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:t6f7iRDq7e/YVfIqJBsdUyQJP3N1i/DPJgcQr6AfoPdwSP79o8bcNUDSrc9gkEXOFd2CrakU1KyI6euwCSQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTokb7osM2DKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46FppIZ8VvDxcK08CLBZFz87KHsd5cvxtBCFQxHcyGEbVzBcqRdCChPZ7Rz8FrP2qCr9qqI99ySdOMDqV6EaUD++6L16CVWg3DwDMCQ4932Rj8hYg6dSoRbnrBt6ld2HKLqJPeZzK/uONegRQnBMC55c
  • Organization: GeometryFactory

On 02/16/2016 03:24 PM, Frédérik Paradis wrote:
Hi everyone,

Hello Frédérik,

I'm currently developing a module for CGAL for the Well-separated pair
decomposition (WSPD) (See [1]). It is actually the first time I use CGAL
so I do not fully understand yet the overall architecture of CGAL. So I
have a couple of questions about how my module should work.

For now, I developed the WSPD with the Split tree in 2D using the class
Point_container.

I developed it in 2D first because I wanted to develop an Ipelet for
Ipe, but I want to develop it in d dimension. So, the first questions is
when do you do many module for 2, 3 and dimension and when do you do
only one module for d dimension?

There are several factors to take into account:
- would there be a significant speed up when using dimension specific implementation?
- can the implementation be made easily dimension generic?



I'm currently using the class Point_container which seems really tied
with the Kd-tree. Should I use that or implement the splitting part
myself? Also, this class take in a parameter an iterator of that typedef:

typedef std::vector<const Point_d*> Point_vector;

It seems contrary to the coding rules of CGAL which has led me to
believe it was more an internal class for the Split tree than anything else.

This class is not documented so it cannot appear in examples but it can
certainly be used in the implementation of algorithms of CGAL. Actually
it is even better to reuse something existing than creating an almost
identical duplicate. At the same time if you need some improvements
or new functions in this class they should be welcome.


Also, when computing the WSPD, it requires the comparison of the
distance between two circles and a factor times the radius of the two
circles. For now, I'm just using CGAL::to_double and the sqrt function.
Is there any other way a should do that?


I would need a more precise definition to answer correctly. However,
there is the traits Root_of_traits that depending on the number type
used will provide an exact representation of algebraic numbers of degree 2 when using an exact number type.

http://doc.cgal.org/latest/Number_types/classCGAL_1_1Root__of__traits.html

http://doc.cgal.org/latest/Number_types/classCGAL_1_1Sqrt__extension.html

Sebastien.

That's all for my questions but I will surely have more later.

Thank you.

Frédérik


[1] http://people.scs.carleton.ca/~michiel/aa-handbook.pdf




Archive powered by MHonArc 2.6.18.

Top of Page