I'm trying to use C++ boost to make a graph from an input file and currently I have vectors with vertex names and edge weights stored in them.
I know how to add vertices using:
typedef boost::graph_traits < Graph >::vertex_descriptor Vertex
Vertex v1 = add_vertex(string("v1"), g);
Vertex v2 = add_vertex(string("v2"), g);
Vertex v3 = add_vertex(string("v3"), g);
But how can I make it so that a new vertex will be created and added to the graph for each element in my vector?