Implements partially mapped crossover. More...
#include <shark/Algorithms/DirectSearch/Operators/Recombination/PartiallyMappedCrossover.h>
Public Member Functions | |
template<class Rng , typename IndividualType > | |
void | operator() (Rng &rng, IndividualType &individual1, IndividualType &individual2) const |
Mates the supplied individuals. More... | |
template<typename Archive > | |
void | serialize (Archive &, const unsigned int) |
Serializes this instance to the supplied archive. More... | |
Implements partially mapped crossover.
PartiallyMappedCrossover recombines points representing permutations, i.e. it ensures that the results are also permutations.
Definition at line 13 of file PartiallyMappedCrossover.h.
|
inline |
Mates the supplied individuals.
[in,out] | individual1 | Individual to be mated. |
[in,out] | individual2 | Individual to be mated. |
Definition at line 20 of file PartiallyMappedCrossover.h.
References shark::random::discrete(), shark::Individual< PointType, FitnessTypeT, Chromosome >::searchPoint(), and SIZE_CHECK.
|
inline |
Serializes this instance to the supplied archive.
Definition at line 76 of file PartiallyMappedCrossover.h.