2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-30 07:52:10 +00:00

Don't generate self edges when asked not to, from Johan Oudinet

[SVN r33644]
This commit is contained in:
Douglas Gregor
2006-04-10 20:09:33 +00:00
parent 96a3f1fa67
commit f44af6dd2f

View File

@@ -89,7 +89,9 @@ namespace boost {
source = x(*gen);
} while ((*out_degrees)[source].second == 0);
current.first = (*out_degrees)[source].first;
current.second = x(*gen);
do {
current.second = x(*gen);
} while (current.first == current.second && !allow_self_loops);
--degrees_left;
if (--(*out_degrees)[source].second == 0) {
(*out_degrees)[source] = out_degrees->back();