Subject: CGAL users discussion list
List archive
- From: Johannes Otepka <>
- To:
- Subject: Re: [cgal-discuss] Kd_tree interface
- Date: Thu, 29 Nov 2007 13:47:53 +0100
true, however the clear function must look like the following code!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.
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
- Kd_tree interface, Matthijs Sypkens Smit, 11/22/2007
- Re: [cgal-discuss] Kd_tree interface, Ashwin Nanjappa, 11/23/2007
- Re: [cgal-discuss] Kd_tree interface, Johannes Otepka, 11/29/2007
- Re: [cgal-discuss] Kd_tree interface, Ashwin Nanjappa, 11/23/2007
Archive powered by MHonArc 2.6.16.