Hi,<div><br></div><div>Thanks for the code explaination.</div><div><br></div><div>By the way, if I insert the edges in a descending order and do not modify the graph,</div><div>I think the edges will remain in ascending order at the <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">iteration through weighted edges ?</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Regards,</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Pierre<br></span></font><br><div class="gmail_quote">2011/2/14 Alpár Jüttner <span dir="ltr"><<a href="mailto:alpar@cs.elte.hu">alpar@cs.elte.hu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<div class="im">><br>
> I want to create a graph with weighted edges and iterate through<br>
> outgoing edges of a given node with ascending weights.<br>
<br>
</div>Unfortunately you must somehow sort the edges by hand in this case.<br>
<br>
For example:<br>
<br>
std::multimap<double,ListDigraph::Arc> m;<br>
<div class="im">for (ListDigraph::OutArcIt a(g, n1); a!=INVALID; ++a)<br>
</div>   m.insert(std::pair<double,ListDigraph::Arc>(length,a));<br>
<br>
int count = 0;<br>
for (std::multimap<double,ListDigraph::Arc>::iterator i =<br>
     m.begin();i!=m.end;++i)<br>
 {<br>
   ++count;<br>
   ListDigraph::Arc a = i->second;<br>
<div class="im">   Node ns= g.source(a);<br>
   Node nd = g.target(a);<br>
   cout << coords[ns] << "," << coords[nd] << "\t/ arc length : "<br>
        << length[a] << endl;<br>
 }<br>
<br>
</div>Regards,<br>
<font color="#888888">Alpár<br>
<br>
<br>
<br>
</font></blockquote></div><br></div>