Hello,
<div><br></div><div>I think this should be a very basic question.</div><div><br></div><div>I have a graph that I read in from an lgf file. A snippet of the lgf file is here:</div><div><br></div><div><div>@edges</div><div>

                label capacity</div><div>0       12       1       1</div><div>1       12       2       1</div></div><div>etc.</div><div><br></div><div>I read the graph in as is shown in the demo file</div><div><br></div>
<div>
<div>  ListGraph g;</div><div>  ListGraph::EdgeMap<int> weight(g);</div><div> </div><div>  try {</div><div>    GraphReader<ListGraph>(g, "g.lgf").</div><div>      edgeMap("capacity", weight).</div>

<div>      run();</div><div>  } catch (Exception& error) { // check if there was any error</div><div>    std::cerr << "Error: " << error.what() << std::endl;</div><div>    return -1;</div>
<div>
  }</div></div><div><br></div><div>Later, I'd like to modify the entries of the edgeMap weight. Specifically, I have a complete bipartite graph with partitions A = {0,...,N-1} and B = {N,N+1,...N+K-1}, and I want to do something like the following:</div>

<div><br></div><div>for(i = 0; i < N; i++) {</div><div>  for(k = 0; k < K; k++) {</div><div>    if(w[i][k] == 0)</div><div>      //here, change the value of edgeMap corresponding to the edge between nodes i and k+N to zero</div>

<div>  }</div><div>}</div><div><br></div><div>How can I do this? I would like to do this by referencing the edges by their endpoints, although I'm assuming this is impossible since this isn't a unique identifier (I thought I saw somewhere in the documentation that it's possible to define multiple edges between nodes). Should/can I use the labels I defined for the edges in the .lgf file to refer to the edges? Or what is the right way to do this?</div>

<div><br></div><div>Thank you,</div><div><br></div><div>Luis de la Torre</div>