I\'m rusty on C++ templates and I\'m using the boost graph library (a fatal combination). I\'ve searched the web and can\'t find any direct instructions on how to take a custom
The approach, as I understand it, is to specialize the boost::graph_traits
structure for your graph type. This configures BGL with various important properties it needs to know about your graph. You then specialize global template functions for your graph's specialized type of graph_traits
to implement whatever boost graph interfaces might apply to your specific kind of graph.
An example is right there in the BGL documentation:
http://www.boost.org/doc/libs/1_43_0/libs/graph/doc/leda_conversion.html
There are links for several of the different interfaces there, which indicate which global template functions you'll need to specialize for your graph if you want to support that interface. The full list of interfaces is here:
http://www.boost.org/doc/libs/1_43_0/libs/graph/doc/graph_concepts.html