- Main Page
- Namespaces
- Classes
- Files

- Search for |

# mix.h

    00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
    00002
    00003 // "mix.h"
    00004
    00005 // (c) OPAC Team, LIFL, 2003-2006
    00006
    00007 /* LICENCE TEXT
    00008
    00009    Contact: paradiseo-help@lists.gforge.inria.fr
    00010 */
    00011
    00012 #ifndef mix_h
    00013 #define mix_h
    00014
    00015 #include <utils/eoRNG.h>
    00016
    00017 template <class T> void mix (std :: vector <T> & __vect)
    00018 {
    00019   for (unsigned int i = 0 ; i < __vect.size () ; i ++)
    00020     {
    00021       std :: swap (__vect [i], __vect [rng.random (__vect.size ())]) ;
    00022     }
    00023 }
    00024
    00025 #endif