c++ Programming Glossary: mygraph
How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order? http://stackoverflow.com/questions/14126/how-to-create-a-c-boost-undirected-graph-and-traverse-it-in-depth-first-search adjacency_list boost listS boost vecS boost undirectedS MyGraph typedef boost graph_traits MyGraph vertex_descriptor MyVertex.. vecS boost undirectedS MyGraph typedef boost graph_traits MyGraph vertex_descriptor MyVertex class MyVisitor public boost default_dfs_visitor.. public void discover_vertex MyVertex v const MyGraph g const cerr v endl return int main MyGraph g boost add_edge..
Algorithm for selecting all edges and vertices connected to one vertex http://stackoverflow.com/questions/5056520/algorithm-for-selecting-all-edges-and-vertices-connected-to-one-vertex describes a Vertex. Edge The type that describes an Edge MyGraph Now you can use a shortcut to the type of the IDs of your Vertices.. to the type of the IDs of your Vertices and Edges typedef MyGraph vertex_descriptor VertexID typedef MyGraph edge_descriptor EdgeID.. Edges typedef MyGraph vertex_descriptor VertexID typedef MyGraph edge_descriptor EdgeID Instanciate your graph MyGraph graph..
|