Skip to content

Instantly share code, notes, and snippets.

@mjbommar
Created August 22, 2009 20:09
Show Gist options
  • Save mjbommar/172966 to your computer and use it in GitHub Desktop.
Save mjbommar/172966 to your computer and use it in GitHub Desktop.
/* V is the set<string> of vertices.
E is the set<int> of edges.
vA and vB are the vertex labels for the current edge.
*/
E.push_back(pair<int, int> (distance(V.begin(), (V.insert(vA)).first),
distance(V.begin(), (V.insert(vB)).first));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment