On 11/21/05, Joaquín Mª López Muñoz
Johan Oudinet ha escrito:
[...]
I think a multi_index_container would be a perfect fit here, because it can provide a sequenced index as the VertexList interface and additional ordered indices for lookup. Unfortunately, this cannot be made to work without some serious hacking, unless BGL provided additional guarantees on some internal details of adjacency_list. The complete story can be read at
http://thread.gmane.org/gmane.comp.lib.boost.devel/116970
where you can find the efforts of a guy called Alexander to blend BGL and Boost.MultiIndex. In the end he succeeded, but only at the expense of relying on the internal implementation of adjacency_list. 100% unsafe.
Thanks for the URL, it was an interresting experience but too long and unsafe for me :-(
Of course, it this a recurrent need I think it'd be great if adjacency_list can be extended/overspecified so as to work with multi_index_containers. My hunch is that little actual work would be needed.
I agree with you and I hope this work will be soon (so I can use it without doing the Alexander's work :-p) I used a mapping from IP address to vertex_descriptor until BGL provides multi_index_containers. Cheers, -- Johan