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: Wed, 20 Feb 2008 14:08:57 +0100

Edson Tadeu wrote:
- Is this feature really missing, or is this possible to do in some other class, or using some Trait somewhere else?

The Kd-tree needs a search traits class as an argument, and that traits class provides the point class. You could therefore in principle write your own search traits class providing "light" points (pointers to actual points, or indices w.r.t your container). But I guess this would be pretty cumbersome in practice since the point class needs to satisfy a lot of requirements (experts, please correct me if I'm wrong).

As far as memory is concerned, using CGAL's Point_d class is fine, since it is reference-counted. This means that no actual copying of coordinates takes place.

Bernd.



Archive powered by MHonArc 2.6.16.

Top of Page