Subject: CGAL users discussion list
List archive
- From: Yang Qu <>
- To:
- Subject: Re: [cgal-discuss] Delaunay Triangulation to Boost Graph
- Date: Fri, 05 Dec 2008 00:54:01 +1000
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=HLGNCDY2nVO+FYIq54SdAMV1Lp2euDMBmEGABnqQryabQYPM0TNtteqiXD/RpBIVyB gybx2mRL2QMW7ii0y/Ecbkyyy8CVXjV8qCYL6x6OGCj0/ANbGVROSfiILpf/LhbpzILa eobJ65kd9ZnBHs/qjYm2qg8lgsKoQwmd3bZuk=
Andreas Fabri 写道:
Qu Yang wrote:Hi Andreas,
Hi all,
I've been trying to convert a delaunay triangulation (DT) to a boost graph.
I want to some operation, such as removing edges in the obtained graph.
The provided example that uses a filtered graph only return a reference to DT.
How can I get a deep copy of the filered graph?
Yang
Hi Yang,
Sorry for the late reply. The idea of the boost::filtered_graph
is just to not physically remove vertices and edges, but to have
a function object which decides if one iterates over vertices and
edges or not.
If you really want a new graph, you should maybe have a look at
http://www.boost.org/doc/libs/1_37_0/libs/graph/doc/copy_graph.html
best regards,
andreas
Thanks for the help. Finally, I managed to copy the filtered delaunay triangulation manually by
edge descriptor and then copy each edge to my new boost graph one by one in a for loop,
but this is too tedious.
I did try to use copy_graph, but my program cannot be compiled with it. I am not sure how
to solve this problem.
Here are some code fragments:
typedef boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS> Graph_copy;
Filter is_finite(dt);
Finite_delaunay finiteDt(dt, is_finite, is_finite);
Graph_copy g;
boost::copy_graph(finiteDt, g);
Errors generated by vs2005:
Error 2 error C2903: 'bind_' : symbol is neither a class template nor a function template D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 3 error C2039: 'bind_' : is not a member of 'boost::DT2_property_map<Tag>' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 4 error C2143: syntax error : missing ';' before '<' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 6 error C2238: unexpected token(s) preceding ';' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 7 error C2653: 'map_gen' : is not a class or namespace name D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 336
Error 8 error C2653: 'map_gen' : is not a class or namespace name D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 9 error C2146: syntax error : missing ';' before identifier 'const_type' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 11 error C2602: 'boost::property_map<Graph,Property>::const_type' is not a member of a base class of 'boost::property_map<Graph,Property>' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 12 error C2868: 'boost::property_map<Graph,Property>::const_type' : illegal syntax for using-declaration; expected qualified-name D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 13 error C2903: 'bind_' : symbol is neither a class template nor a function template D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 14 error C2039: 'bind_' : is not a member of 'boost::DT2_property_map<Tag>' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 15 error C2143: syntax error : missing ';' before '<' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 16 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 17 error C2238: unexpected token(s) preceding ';' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 335
Error 18 error C2653: 'map_gen' : is not a class or namespace name D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 336
Error 19 error C2653: 'map_gen' : is not a class or namespace name D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 20 error C2146: syntax error : missing ';' before identifier 'const_type' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 21 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 22 error C2602: 'boost::property_map<Graph,Property>::const_type' is not a member of a base class of 'boost::property_map<Graph,Property>' D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Error 23 error C2868: 'boost::property_map<Graph,Property>::const_type' : illegal syntax for using-declaration; expected qualified-name D:\Program Files\CGAL-3.3.1\include\CGAL\boost\graph\graph_traits_Delaunay_triangulation_2.h 337
Thanks,
Yang
- Re: [cgal-discuss] Delaunay Triangulation to Boost Graph, Andreas Fabri, 12/03/2008
- Re: [cgal-discuss] Delaunay Triangulation to Boost Graph, Yang Qu, 12/04/2008
Archive powered by MHonArc 2.6.16.