|
Best Regards,
|
||||||||||||||||||
> Hi,
>
> I am fairly new to boost and I have a problem using the in_edges(v, G)
> function.
>
> I have defined a graph of type AdjacencyList:
> typedef adjacency_list<
> vecS,
> vecS,
> directedS,
> VertexProperties,
> EdgeProperties
>> mcf_graph;
(snip)
> produces the error:
> error: no matching function for call to 'in_edges(vertex_descriptor&,
> mcf_graph&)'
>
> The problem does not occur for out_edges. From the examples I have seen
> AdjacencyList should support both functions. Can anybody explain to me why
> in_edges do not work for this example?
The AdjancencyList concept only requires out_edges(). If you want
in_edges(), your graph must be specified with bidirectionalS rather than
directedS as the directedness category.
-- Jeremiah Willcock
________________________________________
Fra: boost-use...@lists.boost.org [boost-use...@lists.boost.org] På vegne af Berit Løfstedt [bl...@man.dtu.dk]
Sendt: 30. juli 2010 15:24
Til: Boost...@lists.boost.org
Emne: [Boost-users] [Graph] Problems with in-edges for a user defined AdjacencyList
Hi,
}
--
Best Regards,
Berit Løfstedt
PhD. Student
Technical University of Denmark
[cid:part1.00040...@man.dtu.dk]
Department of Management Engineering
Produktionstorvet, Bygning 426
2800 Kgs. Lyngby
bl...@man.dtu.dk<mailto:bl...@man.dtu.dk>
www.or.man.dtu.dk<http://www.or.man.dtu.dk>
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
|
Best Regards,
| |||||
| |||||
| |||
|
|
||||||
Hi Try using bidirectionalS instead (thats what I do for my directed graphs). Please tell me is it works. Best Line :-) ________________________________________ Fra: boost-use...@lists.boost.org [boost-use...@lists.boost.org] På vegne af Berit L�fstedt [bl...@man.dtu.dk] Sendt: 30. juli 2010 15:24 Til: Boost...@lists.boost.org
mcf_graph;The following code with m_current_network being a private class variable of type mcf_graph void best_insertion::search() { vertex_descriptor v,u,w; edge_descriptor e; graph_traits<mcf_graph>::in_edge_iterator in_e, in_end; graph_traits<mcf_graph>::out_edge_iterator out_e, out_end; edge_index_map_t edge_indices=get ( edge_index, m_current_network ); edge_type_map_t edge_types= get(edge_type, m_current_network); capacity_map_t edge_capacities=get ( edge_capacity, m_current_network ); vector<int> indices; vector<int>::iterator it, it_end; //select vertex v to reinsert //find_edge_indices of vertex v for ( tie ( in_e, in_end ) = in_edges(v, m_current_network ); in_e != in_end; in_e++ ) { e=*in_e; indices.push_back ( edge_indices[e] ); } for ( tie ( out_e, out_end ) = out_edges( v, m_current_network ); out_e != out_end; out_e++ ) { e=*out_e; indices.push_back ( edge_indices[e] ); } produces the error: error: no matching function for call to �in_edges(vertex_descriptor&, mcf_graph&)� The problem does not occur for out_edges. From the examples I have seen AdjacencyList should support both functions. Can anybody explain to me why in_edges do not work for this example? -- Best Regards, Berit L�fstedt PhD. Student DTU Management Engineering, Operations Research Technical University of Denmark [cid:part1.00040...@man.dtu.dk] Department of Management Engineering Produktionstorvet, Bygning 426 2800 Kgs. Lyngby
|
Best Regards,
|
||||||||||||||||||