title: What is the optimal way to create a graph with add_edge_list() method?
body: <p>I am trying to create large graph via <code>graph-tool</code> library (near 10^6 - 10^7 vertices) and fill vertex property with vertex name or use names instead of vertex indexes. I have:</p>
  
  <ol>
  <li><p>list of names:</p>
  
  <pre><code>['50', '56', '568']
  </code></pre></li>
  <li><p>set of edges, but instead of vertex indexes it consists of their names:</p>
  
  <pre><code>edge_list = {frozenset({'568', '56'}), frozenset({'56', '50'}), frozenset({'50', '568'})}
  </code></pre></li>
  </ol>
  
  <p>Since <code>add_edge_list()</code> allows to create vertices if they are no such vertix in the graph. I'm trying to use it to fill an empty graph. It works ok, but when I was trying to get vertex by its name, I got an error that there are no vertex with such index.</p>
  
  <p>Here is the code of my program:</p>
  
  <pre class="lang-py prettyprint-override"><code>g = grt.Graph(directed=False)
  edge_list = {frozenset({'568', '56'}), frozenset({'56', '50'}), frozenset({'50', '568'})}
  ids = ['50', '56', '568']
  g.add_edge_list(edge_list, hashed=True, string_vals=True)
  print(g.vertex('50'))
  </code></pre>
  
  <p>The error message of <code>print(g.vertex('50'))</code>:</p>
  
  <pre><code>ValueError: Invalid vertex index: 50
  </code></pre>
  
  <p>I want to create graph:</p>
  
  <ol>
  <li>Using <code>edge_list</code> only;</li>
  <li>Having quick access to a vertex by its name;</li>
  <li>Optimal by time (and RAM if possible).</li>
  </ol>
  
  <p>Is there any good way to do this?</p>
  
  <p>EDIT: 
  Current code:</p>
  
  <pre class="lang-py prettyprint-override"><code>g = grt.Graph(directed=False)
  g.add_vertex(len(ids))
  vprop = g.new_vertex_property("string", vals=ids)
  g.vp.user_id = vprop  
  for vert1, vert2 in edges_list:
      g.add_edge(g.vertex(ids_dict[vert1]), g.vertex(ids_dict[vert2]))
  </code></pre>