Hi all,<div><br></div><div>I encounter a compiling error when I try to create a Gomory-hu instance.</div><div><br></div><div><div>// Construct a lemon graph instance</div><div> 697     SmartGraph g;</div><div> 698     SmartGraph::EdgeMap<int> cost(g);</div>
<div> 699     try{</div><div> 700         graphReader(g, argv[3]).</div><div> 701         edgeMap("cost", cost).</div><div> 702         run();</div><div> 703     }</div><div> 704     catch (Exception& error)</div>
<div> 705     {</div><div> 706         std::cerr << "Error: " << error.what() << std::endl;</div><div> 707         return -1;</div><div> 708     }</div><div> 709     SmartGraph::EdgeMap<double> capacity(g);</div>
<div> 710     for (SmartGraph::EdgeIt n(g); n != INVALID; ++n)</div><div> 711     {</div><div> 712         int j = <a href="http://g.id">g.id</a>(n);</div><div> 713         cout << j << " ";</div><div>
 714         capacity[n] = 0.5;</div><div> 715     }       </div><div> 716     cout << endl;</div><div> 717     GomoryHu<SmartGraph> gomoryhu(g, capacity);</div><div> 718     gomoryhu.run();</div><div> 719     exit(0);</div>
<div><br></div><div>The error that shoes up when compiling is that, there is no matching function for the constructor GomoryHu(g, capacity), and</div><div>the Problem is in line 709, when I change the type from double to int, it then has no errors, but I don't think Lemon only supports int type capacities.</div>
<div><br></div><div>Can anyone give me a hint on what is going on here? </div><div><br></div><div>Also, in order to get a minimum k-cut heuristically, I may need to go through all the edges in the gomory-hu tree and choose the union of the k smallest edges, which corresponds to a heuristically chosen k-cut. Is there any efficient way to do this?</div>
<div><br></div><div>Thanks!</div><div><br></div><div>Best,</div><div><div><br></div>-- <br>Sincerely:<br>SONG Yongjia(宋永佳)<br><br>Department of Industrial and Systems Engineering<br>College of Engineering, University of Wisconsin-Madison<br>
3241 Mechanical Engineering Building<br>1513 University Avenue, Madison, WI 53706<br>
</div></div>