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. | |
| template<typename Archive > | |
| void | serialize (Archive &, const unsigned int) |
| Serializes this instance to the supplied archive. | |
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] | rng | Random number generator. |
| [in,out] | individual1 | Individual to be mated. |
| [in,out] | individual2 | Individual to be mated. |
Definition at line 21 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 77 of file PartiallyMappedCrossover.h.