[graph] leda_graph.hpp: edge property maps

leda_graph.hpp has an adapter for leda::node_array's as property maps. Could the same code (replacing node by edge, where appropriate) be used to make an adapter for leda::edge_array's? Well, I'll try this out right now ...

Jens Müller wrote:
leda_graph.hpp has an adapter for leda::node_array's as property maps.
Could the same code (replacing node by edge, where appropriate) be used to make an adapter for leda::edge_array's?
Well, I'll try this out right now ...
The code in the attached file indeed seems to work ...
Unfortunately, I cannot really test this at the moment - the graphml
reader from graph-tool does not seem to work with LEDA graphs.
Either I'm too stupid to use the LEDA adapter, or all kinds of types in
graph_traits are not defined for LEDA graphs.
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:26:
error: no type named `vertex_descriptor' in `class main(char,
char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:27:
error: no type named `edge_descriptor' in `class main(char, char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:28:
error: no type named `adjacency_iterator' in `class main(char,
char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:29:
error: no type named `out_edge_iterator' in `class main(char,
char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:30:
error: no type named `in_edge_iterator' in `class main(char, char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:31:
error: no type named `vertex_iterator' in `class main(char, char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:32:
error: no type named `edge_iterator' in `class main(char, char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:34:
error: no type named `directed_category' in `class main(char,
char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:35:
error: no type named `edge_parallel_category' in `class main(char,
char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:36:
error: no type named `traversal_category' in `class main(char,
char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:38:
error: no type named `vertices_size_type' in `class main(char,
char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:39:
error: no type named `edges_size_type' in `class main(char, char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:40:
error: no type named `degree_size_type' in `class main(char, char**)::Graph'
/home/jmueller/software-gcc34/boost/include/boost-1_33_1/boost/graph/graph_traits.hpp:48:
error: no type named `vertex_descriptor' in `struct
boost::graph_traits
::value_type get(PropertyTag p, const leda::GRAPH
& g, const Key& key) { return get(get(p, g), key); }
template

Jens Müller wrote:
The code in the attached file indeed seems to work ...
Unfortunately, I cannot really test this at the moment - the graphml reader from graph-tool does not seem to work with LEDA graphs.
Either I'm too stupid to use the LEDA adapter, or all kinds of types in graph_traits are not defined for LEDA graphs.
Hmmpf ... I used leda::graph instead of leda::GRAPH
participants (1)
-
Jens Müller