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.
 
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).
 

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

◆ operator()()

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

◆ 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 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.

Member Data Documentation

◆ m_lower

◆ m_nc

◆ m_prob

◆ m_upper


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