Subject: CGAL users discussion list
List archive
- From: "Godmar Back" <>
- To:
- Subject: Re: [cgal-discuss] possible bug in examples/BGL_triangulation_2/emst.cpp
- Date: Fri, 25 Jul 2008 20:02:03 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=TAAySPpLEag3sDvG2+JAcDHIhBt5awY+tYiJz/aAmWQTB7JWVJxTexfl1qK6PtGbQF iYjBMfhAQVNZb6ILm8RlBFYVsk+amBCxeAbufwn4rLyxaeqVXOd8prs9jd6wpbpz5vyQ pskJFA4BbvhvBZYojW87AtifiO7IhoTDjhZ9w=
ps. I found the bug in the example. The bug is that you pass the
actual triangulation, instead of the filtered triangulation, to
boost::kruskal_minimum_spanning_tree.
It should be:
boost::kruskal_minimum_spanning_tree(ft,
std::back_inserter(mst),
vertex_index_map(vertex_index_pmap));
instead of
boost::kruskal_minimum_spanning_tree(t,
std::back_inserter(mst),
vertex_index_map(vertex_index_pmap));
(note the "ft" instead of "t")
- Godmar
On Fri, Jul 25, 2008 at 11:47 AM,
<>
wrote:
>
> Hi,
>
> I'm trying to run the example shown here:
>
> http://www.cgal.org/Manual/3.3/examples/BGL_triangulation_2/emst.cpp
> http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/BGL/Chapter_main.html#Subsection_56.5.1
>
> I'm getting this output:
>
> CGAL error: precondition violation!
> Expr: ! is_infinite(e)
> File: /usr/include/CGAL/Triangulation_2.h
> Line: 825
> terminate called after throwing an instance of 'std::logic_error'
> what(): basic_string::_S_construct NULL not valid
> Aborted
>
> This example uses a boost filtered graph to filter out infinite vertices and
> edges.
>
> However, this filter is only invoked for the vertices, it's not invoked for
> the
> edges at all. I can verify this by placing a print statement in the ()
> operator.
>
> Therefore, the msp computation encounters an infinite edge and fails.
>
> I'm using Ubuntu's cgal2 and boost pre-installed packages.
>
> - Godmar
>
> ps: the input is here:
> $ cat data/graph.cin
> 1 2
> 4 5
> 7 8
> 3 5
> 9 6
> 5 6
> 4 3
> 5 5
> 7 4
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
- [cgal-discuss] possible bug in examples/BGL_triangulation_2/emst.cpp, godmar, 07/25/2008
- Re: [cgal-discuss] possible bug in examples/BGL_triangulation_2/emst.cpp, Godmar Back, 07/26/2008
Archive powered by MHonArc 2.6.16.