Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Kd_tree interface

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Kd_tree interface


Chronological Thread 
  • From: Johannes Otepka <>
  • To:
  • Subject: Re: [cgal-discuss] Kd_tree interface
  • Date: Thu, 29 Nov 2007 13:47:53 +0100


In the manual for CGAL 3.3 it says that there is a class method clear(), to clear a Kd_tree, but it seems that is does not exist in the code. Looking at the code I conclude that at insertion the tree is cleared automatically. However, this is even the case for the insertion of a single point. Is there any use for a tree with just a single point?

Yes, Kd_tree.clear() is in the manual, but doesn't seem to be implemented. I see this problem too.

true, however the clear function must look like the following code!

void clear()
{
invalidate_built();
pts.clear();
}

Matthijs, you misunderstood the insert function. it only deletes the existing tree structure ( invalidate_built() ) but doesn't remove any points. so you can continuously add points by repeating insert calls. finally, by calling build() or performing a spatial query the actual tree structure is (re)build again.

cheers,
johannes



Archive powered by MHonArc 2.6.16.

Top of Page