Simulated binary crossover operator. More...
#include <shark/Algorithms/DirectSearch/Operators/Recombination/SimulatedBinaryCrossover.h>
Public Member Functions | |
| SimulatedBinaryCrossover () | |
| void | init (RealVector const &lower, RealVector const &upper) |
| Initializes the operator for the supplied box-constraints. | |
| template<class randomType , typename IndividualType > | |
| void | operator() (randomType &rng, IndividualType &i1, IndividualType &i2) const |
| Mates the supplied individuals. | |
| template<typename Archive > | |
| void | serialize (Archive &archive, const unsigned int version) |
| Serializes this instance to the supplied archive. | |
Public Attributes | |
| double | m_nc |
| Parameter nc. | |
| double | m_prob |
| Crossover probability. | |
| RealVector | m_upper |
| Upper bound (box constraint). | |
| RealVector | m_lower |
| Lower bound (box constraint). | |
Simulated binary crossover operator.
Definition at line 42 of file SimulatedBinaryCrossover.h.
|
inline |
Definition at line 44 of file SimulatedBinaryCrossover.h.
|
inline |
Initializes the operator for the supplied box-constraints.
Definition at line 49 of file SimulatedBinaryCrossover.h.
References shark::SimulatedBinaryCrossover< PointType >::m_lower, shark::SimulatedBinaryCrossover< PointType >::m_prob, shark::SimulatedBinaryCrossover< PointType >::m_upper, and SIZE_CHECK.
Referenced by shark::IndicatorBasedRealCodedNSGAII< Indicator >::doInit(), and shark::SMSEMOA::doInit().
|
inline |
Mates the supplied individuals.
| [in] | rng | Random number generator. |
| [in,out] | i1 | Individual to be mated. |
| [in,out] | i2 | Individual to be mated. |
Definition at line 62 of file SimulatedBinaryCrossover.h.
References shark::random::coinToss(), shark::SimulatedBinaryCrossover< PointType >::m_lower, shark::SimulatedBinaryCrossover< PointType >::m_nc, shark::SimulatedBinaryCrossover< PointType >::m_prob, shark::SimulatedBinaryCrossover< PointType >::m_upper, shark::Individual< PointType, FitnessTypeT, Chromosome >::searchPoint(), and shark::random::uni().
|
inline |
Serializes this instance to the supplied archive.
| Archive | The type of the archive the instance shall be serialized to. |
| [in,out] | archive | The archive to serialize to. |
| [in] | version | Version information (optional and not used here). |
Definition at line 126 of file SimulatedBinaryCrossover.h.
References shark::SimulatedBinaryCrossover< PointType >::m_lower, shark::SimulatedBinaryCrossover< PointType >::m_nc, shark::SimulatedBinaryCrossover< PointType >::m_prob, and shark::SimulatedBinaryCrossover< PointType >::m_upper.
| RealVector shark::SimulatedBinaryCrossover< PointType >::m_lower |
Lower bound (box constraint).
Definition at line 137 of file SimulatedBinaryCrossover.h.
Referenced by shark::SimulatedBinaryCrossover< PointType >::init(), shark::SimulatedBinaryCrossover< PointType >::operator()(), and shark::SimulatedBinaryCrossover< PointType >::serialize().
| double shark::SimulatedBinaryCrossover< PointType >::m_nc |
Parameter nc.
Definition at line 133 of file SimulatedBinaryCrossover.h.
Referenced by shark::IndicatorBasedRealCodedNSGAII< Indicator >::doInit(), shark::SMSEMOA::doInit(), shark::MOEAD::nc(), shark::IndicatorBasedRealCodedNSGAII< Indicator >::nc(), shark::RVEA::nc(), shark::MOEAD::nc(), shark::IndicatorBasedRealCodedNSGAII< Indicator >::nc(), shark::RVEA::nc(), shark::SMSEMOA::nc(), shark::SimulatedBinaryCrossover< PointType >::operator()(), shark::SimulatedBinaryCrossover< PointType >::serialize(), and shark::SMSEMOA::SMSEMOA().
| double shark::SimulatedBinaryCrossover< PointType >::m_prob |
Crossover probability.
Definition at line 134 of file SimulatedBinaryCrossover.h.
Referenced by shark::SimulatedBinaryCrossover< PointType >::init(), shark::SimulatedBinaryCrossover< PointType >::operator()(), and shark::SimulatedBinaryCrossover< PointType >::serialize().
| RealVector shark::SimulatedBinaryCrossover< PointType >::m_upper |
Upper bound (box constraint).
Definition at line 136 of file SimulatedBinaryCrossover.h.
Referenced by shark::SimulatedBinaryCrossover< PointType >::init(), shark::SimulatedBinaryCrossover< PointType >::operator()(), and shark::SimulatedBinaryCrossover< PointType >::serialize().