Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Kd-tree is keeping a redundant vector of points

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Kd-tree is keeping a redundant vector of points


Chronological Thread 
  • From: Bernd Gaertner <>
  • To:
  • Subject: Re: [cgal-discuss] Kd-tree is keeping a redundant vector of points
  • Date: Mon, 25 Feb 2008 12:21:41 +0100

Edson Tadeu wrote:
But to correctly extend a class in the G.P. paradigm, you must have the right extension point. In this case, the right extension point would be a template parameter (or a trait type) over a Point Collection Concept (or Point Map, or Point Function), but this is not available.
I think that the Point Concept ("Point_d") is for points only... to simulate a Point using a handle plus a container pointer plus adaptor methods is to abuse this concept.

Let's suppose I create a (very simplified) point structure like this:

struct PointHandle {
size_t point_index;
std::vector<Point_3>* point_container;
};
// + zillions of methods to adapt this structure to work like a point (difference, distance, etc, etc)

I was rather thinking about decorating the CGAL points (with an integer, say, that denotes the index in the collection that you maintain). This doesn't require to write zillions of methods, it's just some simple inheritence. But I agree that this is also restricted, if you have essentially different points (as the ones generated on the fly that you mention as an example).

Bernd.



Archive powered by MHonArc 2.6.16.

Top of Page