paradiseo/branches/paradiseo-peo-meta-model/tutorial/examples/tsp/edge_xover.h
legrand a0f7039b27 Renamed new meta model branch
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@609 331e1502-861f-0410-8da2-ba01fb791d7f
2007-09-20 14:33:54 +00:00

43 lines
873 B
C++

// "edge_xover.h"
// (c) OPAC Team, LIFL, 2003
/*
Contact: paradiseo-help@lists.gforge.inria.fr
*/
#ifndef edge_xover_h
#define edge_xover_h
#include <vector>
#include <set>
#include <eoOp.h>
#include "route.h"
/** Edge Crossover */
class EdgeXover : public eoQuadOp <Route> {
public :
bool operator () (Route & __route1, Route & __route2) ;
private :
void cross (const Route & __par1, const Route & __par2, Route & __child) ; /* Binary */
void remove_entry (unsigned __vertex, std :: vector <std :: set <unsigned> > & __map) ;
/* Updating the map of entries */
void build_map (const Route & __par1, const Route & __par2) ;
void add_vertex (unsigned __vertex, Route & __child) ;
std :: vector <std :: set <unsigned> > _map ; /* The handled map */
std :: vector <bool> visited ; /* Vertices that are already visited */
} ;
#endif