Subject: CGAL users discussion list
List archive
- From: Efraim Fogel <>
- To:
- Subject: Re: [cgal-discuss] Arr_vertical_decomposition_2.h
- Date: Mon, 23 Feb 2009 12:07:02 +0200
You are absolutely right. As the fix is simple, I assume you don't need a patch. The fix will make into the next release. Thanks, Efi.
Jannis Warnat wrote:
Hi,--
there is a bug in Arr_vertical_decomposition_2.h from CGAL 3.4 in the following code snippet (line 85):
// Go over all isolated vertices and collect their points. To each point
// we attach its vertex handle.
std::vector<Vd_point_2> iso_pts_vec (arr.number_of_isolated_vertices());
Vertex_const_iterator vit;
Vertex_const_handle iso_v;
i = 0;
for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit, ++i)
{
// Associate isolated point with the vertex that represents it.
if (vit->is_isolated())
{
iso_v = vit;
iso_pts_vec[i] = Vd_point_2 (vit->point(), iso_v);
}
}
The "++i" should be moved to the end of the if-clause. Otherwise i goes up to arr.number_of_vertices() while the vector iso_pts_vec is initialized for arr.number_of_isolated_vertices() elements.
Kind regards,
Jannis Warnat
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
- [cgal-discuss] Arr_vertical_decomposition_2.h, Jannis Warnat, 02/20/2009
- Re: [cgal-discuss] Arr_vertical_decomposition_2.h, Efraim Fogel, 02/23/2009
Archive powered by MHonArc 2.6.16.