Hi Gustavo, On Mar 17, 2004, at 11:13 AM, Gustavo Sánchez wrote:
I have to build a graph from data in a file, some information is strings which are related to vertexes. I want to prove if those vertexes already exist in the graph before the insert operation. Next is the source: typedef adjacency_matrix
UGraph; // an undirected graph UGraph g(0); // start from scratch
The adjacency_matrix class does not have an add_vertex function, so this graph will always be empty :( Maybe you should use adjacency_list instead? Also, you have to have vertices in the graph before you can start working with their properties.
property_map
::type ename = get(edge_name, g); // not sure if this is right (the graph have no elements at this point) property_map ::type vname = get(vertex_name, g); typedef property_map ::type vname_type; typedef boost::property_traits
::key_type vktype; typedef boost::property_traits ::value_type vvtype; vktype indice_nombre; vvtype valor_nombre; for(i=0;i
Antivirus • Filtros antispam • 6 MB gratis ¿Todavía no tienes un correo inteligente? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users