Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d


Chronological Thread 
  • From: Samuel Hornus <>
  • To:
  • Subject: Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d
  • Date: Fri, 10 Sep 2010 16:03:38 +0200
  • Organization: LORIA

On Fri, 10 Sep 2010 11:03:11 +0200
Bernd Gaertner
<>
wrote:

> Samuel Hornus wrote:
> > To speed-up the computation, I would like to reuse the
> > (already computed) Min_sphere from the left child of a node as a
> > starting point in which to include the points of the right child,
> > so as to obtain the bounding sphere of the node more quickly than
> > from scratch.
> >
> > However, I get assertion failure in Min_sphere_of_spheres_d.h, line
> > 253 (trunk), because vector 'l' is already non empty.

[...]

> > Is it truly intentional in the sense that the computation is not
> > restartable ? Or is it a over-zealous assertion ?
>
> It is true that l needs to be empty; a restart does make use of the
> current optimal ball, but then goes through *all* inserted balls
> again for the update (this may be a waste in the first round of such
> an update, but it is unavoidable later). I think the fix is to insert
> the statement "l.clear();" right before the assertion. If you are
> successful with this, I will thoroughly test and submit a
> corresponding bug fix.

Thank you Bernd,

l.clear() indeed seems to fix the problem and, as far as I can trust
gluSphere and my code and my eyes, the patched code correctly computes
the new miniball(s), and I get a little more than 30% speed-up for
computing all the balls.

thank you again,
--
Sam



Archive powered by MHonArc 2.6.16.

Top of Page