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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user