Changeset 2242:16523135943d in lemon-0.x for demo/simann_maxcut_demo.cc
- Timestamp:
- 10/14/06 17:26:05 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2991
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/simann_maxcut_demo.cc
r1956 r2242 55 55 double mutate() { 56 56 static const int node_num = countNodes(g); 57 int i = 1 + (int) (node_num * (rand() / (RAND_MAX + 1.0)));57 int i = 1 + rnd[node_num]; 58 58 NodeIt n(g); 59 59 int j = 1; … … 92 92 a[n] = false; 93 93 for (NodeIt n(g); n != INVALID; ++n) 94 if (r and() < 0.5) a[n] = true;94 if (rnd.boolean(0.5)) a[n] = true; 95 95 sum = 0; 96 96 for (EdgeIt e(g); e != INVALID; ++e)
Note: See TracChangeset
for help on using the changeset viewer.