#include <eoVRPQuadCrossover.h>
Inheritance diagram for eoVRPEdgeCrossover:

Public Member Functions | |
| eoVRPEdgeCrossover () | |
| Deafult constructor. | |
| std::string | className () const |
| Returns a string containing the name of the class. | |
| bool | operator() (eoVRP &_genotype1, eoVRP &_genotype2) |
| Both parameters are the parents and the (future) children of the crossover. | |
Private Member Functions | |
| bool | EdgeCrossover (eoVRP &_genotype1, eoVRP &_genotype2, eoVRP &_child) |
| Actually performs the edge crossover. | |
| void | remove_entry (unsigned _vertex, std::vector< std::set< unsigned > > &_map) |
| Removes a vertex from all his neighbours. | |
| void | add_vertex (unsigned _vertex, std::vector< bool > &_visited, std::vector< std::set< unsigned > > &_map, eoVRP &_child) |
| Adds a vertex to a child and erases it from the list of available vertices. | |
Definition at line 240 of file eoVRPQuadCrossover.h.
| std::string eoVRPEdgeCrossover::className | ( | void | ) | const [inline, virtual] |
Returns a string containing the name of the class.
Used to display statistics.
Reimplemented from eoQuadOp< eoVRP >.
Definition at line 258 of file eoVRPQuadCrossover.h.
Both parameters are the parents and the (future) children of the crossover.
| _genotype1 | The first parent. | |
| _genotype2 | The second parent. |
Implements eoBF< eoVRP &, eoVRP &, bool >.
Definition at line 272 of file eoVRPQuadCrossover.h.
References eoVRP::clean(), and EdgeCrossover().
| bool eoVRPEdgeCrossover::EdgeCrossover | ( | eoVRP & | _genotype1, | |
| eoVRP & | _genotype2, | |||
| eoVRP & | _child | |||
| ) | [inline, private] |
Actually performs the edge crossover.
| _genotype1 | First parent. | |
| _genotype2 | Second parent. | |
| _child | Child. |
Definition at line 301 of file eoVRPQuadCrossover.h.
References add_vertex(), and eoRng::random().
Referenced by operator()().
| void eoVRPEdgeCrossover::remove_entry | ( | unsigned | _vertex, | |
| std::vector< std::set< unsigned > > & | _map | |||
| ) | [inline, private] |
Removes a vertex from all his neighbours.
| _vertex | The vertex being erased. | |
| _map | The structure containing the neighbourhood relationship. |
Definition at line 380 of file eoVRPQuadCrossover.h.
Referenced by add_vertex().
| void eoVRPEdgeCrossover::add_vertex | ( | unsigned | _vertex, | |
| std::vector< bool > & | _visited, | |||
| std::vector< std::set< unsigned > > & | _map, | |||
| eoVRP & | _child | |||
| ) | [inline, private] |
Adds a vertex to a child and erases it from the list of available vertices.
| _vertex | The vertex being added to the child. | |
| _visited | The vector of visited vertices. | |
| _map | The structure containing the neighbourhood relationship. | |
| _child | The child where we add the vertex. |
Definition at line 398 of file eoVRPQuadCrossover.h.
References remove_entry().
Referenced by EdgeCrossover().
1.4.7