shark::SimulatedBinaryCrossover< PointType > Struct Template Reference

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. More...
 
template<class randomType , typename IndividualType >
void operator() (randomType &rng, IndividualType &i1, IndividualType &i2) const
 Mates the supplied individuals. More...
 
template<typename Archive >
void serialize (Archive &archive, const unsigned int version)
 Serializes this instance to the supplied archive. More...
 

Public Attributes

double m_nc
 Parameter nc. More...
 
double m_prob
 Crossover probability. More...
 
RealVector m_upper
 Upper bound (box constraint). More...
 
RealVector m_lower
 Lower bound (box constraint). More...
 

Detailed Description

template<typename PointType>
struct shark::SimulatedBinaryCrossover< PointType >

Simulated binary crossover operator.

Definition at line 42 of file SimulatedBinaryCrossover.h.

Constructor & Destructor Documentation

◆ SimulatedBinaryCrossover()

template<typename PointType>
shark::SimulatedBinaryCrossover< PointType >::SimulatedBinaryCrossover ( )
inline

Definition at line 44 of file SimulatedBinaryCrossover.h.

Member Function Documentation

◆ init()

template<typename PointType>
void shark::SimulatedBinaryCrossover< PointType >::init ( RealVector const &  lower,
RealVector const &  upper 
)
inline

Initializes the operator for the supplied box-constraints.

Definition at line 49 of file SimulatedBinaryCrossover.h.

Referenced by shark::SMSEMOA::doInit(), and shark::IndicatorBasedRealCodedNSGAII< NSGA3Indicator >::doInit().

◆ operator()()

template<typename PointType>
template<class randomType , typename IndividualType >
void shark::SimulatedBinaryCrossover< PointType >::operator() ( randomType &  rng,
IndividualType i1,
IndividualType i2 
) const
inline

Mates the supplied individuals.

Parameters
[in,out]i1Individual to be mated.
[in,out]i2Individual to be mated.

Definition at line 61 of file SimulatedBinaryCrossover.h.

◆ serialize()

template<typename PointType>
template<typename Archive >
void shark::SimulatedBinaryCrossover< PointType >::serialize ( Archive &  archive,
const unsigned int  version 
)
inline

Serializes this instance to the supplied archive.

Template Parameters
ArchiveThe type of the archive the instance shall be serialized to.
Parameters
[in,out]archiveThe archive to serialize to.
[in]versionVersion information (optional and not used here).

Definition at line 125 of file SimulatedBinaryCrossover.h.

Member Data Documentation

◆ m_lower

◆ m_nc

◆ m_prob

◆ m_upper


The documentation for this struct was generated from the following file: