Subject: CGAL users discussion list
List archive
- From: Samuel Hornus <>
- To: cgal-discuss <>
- Subject: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d
- Date: Thu, 9 Sep 2010 14:24:48 +0200
- Organization: LORIA
Hi,
I am using Min_sphere_of_spheres_d to compute bounding spheres at each
node of a hierarchy of points (a binary tree) :
typedef CGAL::Cartesian_d<double> K;
typedef CGAL::Min_sphere_of_spheres_d_traits_d<K,double,3> Traits;
typedef CGAL::Min_sphere_of_spheres_d<Traits> Min_sphere;
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.
template<class Traits>
inline void Min_sphere_of_spheres_d<Traits>::update() {
// set up the vector l containing pointers to the balls in S:
HERE --> CGAL_MINIBALL_ASSERT(l.size() == 0);
for (typename std::vector<Sphere>::const_iterator it = S.begin();
it != S.end(); ++it)
l.push_back(&(*it));
// compute the miniball:
update(Algorithm());
is_up_to_date = true;
}
Is it truly intentional in the sense that the computation is not
restartable ? Or is it a over-zealous assertion ?
The documentation doesn't seem to say anything about this, so I assumed
I can insert points. Query the radius, then continue to insert more
points... is this wrond ?
Thank you !
--
Samuel Hornus
http://www.loria.fr/~shornus/
- [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d, Samuel Hornus, 09/09/2010
- Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d, Bernd Gaertner, 09/10/2010
- Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d, Samuel Hornus, 09/10/2010
- Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d, Samuel Hornus, 09/10/2010
- Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d, Bernd Gaertner, 09/10/2010
- Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d, Samuel Hornus, 09/10/2010
- Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d, Samuel Hornus, 09/10/2010
- Re: [cgal-discuss] Reinserting spheres in Min_sphere_of_spheres_d, Bernd Gaertner, 09/10/2010
Archive powered by MHonArc 2.6.16.