- Main Page
- Classes
- Files

- Search for |

# route_init.cpp

    00001 // "route_init.cpp"
    00002
    00003 // (c) OPAC Team, LIFL, January 2006
    00004
    00005 /*
    00006    Contact: paradiseo-help@lists.gforge.inria.fr
    00007 */
    00008
    00009 #include <utils/eoRNG.h>
    00010
    00011 #include "route_init.h"
    00012 #include "node.h"
    00013
    00014 void RouteInit :: operator () (Route & __route) {
    00015
    00016   __route.clear ();
    00017
    00018   for (unsigned i = 0 ; i < numNodes ; i ++)
    00019     __route.push_back (i);
    00020
    00021   for (unsigned i = 0 ; i < numNodes ; i ++)
    00022     std :: swap (__route [i], __route [rng.random (numNodes)]);
    00023 }