COIN-OR::LEMON - Graph Library

Changeset 2242:16523135943d in lemon-0.x for demo/simann_maxcut_demo.cc


Ignore:
Timestamp:
10/14/06 17:26:05 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2991
Message:

New random interface
Switching to the new interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/simann_maxcut_demo.cc

    r1956 r2242  
    5555    double mutate() {
    5656      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];
    5858      NodeIt n(g);
    5959      int j = 1;
     
    9292        a[n] = false;
    9393      for (NodeIt n(g); n != INVALID; ++n)
    94         if (rand() < 0.5) a[n] = true;
     94        if (rnd.boolean(0.5)) a[n] = true;
    9595      sum = 0;
    9696      for (EdgeIt e(g); e != INVALID; ++e)
Note: See TracChangeset for help on using the changeset viewer.