shark::PolynomialMutator Struct Reference

Polynomial mutation operator. More...

#include <shark/Algorithms/DirectSearch/Operators/Mutation/PolynomialMutation.h>

Public Member Functions

 PolynomialMutator ()
 Default c'tor. More...
 
void init (RealVector const &lower, RealVector const &upper)
 Initializes the operator for the supplied box-constraints. More...
 
template<typename IndividualType >
void operator() (random::rng_type &rng, IndividualType &ind) const
 Mutates the supplied individual. More...
 
template<typename Archive >
void serialize (Archive &archive, const unsigned int version)
 Serializes this instance to the supplied archive. More...
 

Public Attributes

double m_nm
 
double m_prob
 
RealVector m_upper
 
RealVector m_lower
 

Detailed Description

Polynomial mutation operator.

Definition at line 42 of file PolynomialMutation.h.

Constructor & Destructor Documentation

◆ PolynomialMutator()

shark::PolynomialMutator::PolynomialMutator ( )
inline

Default c'tor.

Definition at line 45 of file PolynomialMutation.h.

Member Function Documentation

◆ init()

void shark::PolynomialMutator::init ( RealVector const &  lower,
RealVector const &  upper 
)
inline

Initializes the operator for the supplied box-constraints.

Definition at line 48 of file PolynomialMutation.h.

References m_lower, m_prob, m_upper, and SIZE_CHECK.

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

◆ operator()()

template<typename IndividualType >
void shark::PolynomialMutator::operator() ( random::rng_type &  rng,
IndividualType ind 
) const
inline

Mutates the supplied individual.

for accessing the actual search point.

Parameters
[in,out]indIndividual to be mutated.

Definition at line 60 of file PolynomialMutation.h.

References shark::random::coinToss(), m_lower, m_nm, m_prob, m_upper, shark::Individual< PointType, FitnessTypeT, Chromosome >::searchPoint(), and shark::random::uni().

◆ serialize()

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

Serializes this instance to the supplied archive.

Parameters
[in,out]archiveThe archive to serialize to.
[in]versionVersion information (optional and not used here).

Definition at line 105 of file PolynomialMutation.h.

References m_lower, m_nm, m_prob, and m_upper.

Member Data Documentation

◆ m_lower

RealVector shark::PolynomialMutator::m_lower

Definition at line 116 of file PolynomialMutation.h.

Referenced by init(), operator()(), and serialize().

◆ m_nm

◆ m_prob

double shark::PolynomialMutator::m_prob

Definition at line 113 of file PolynomialMutation.h.

Referenced by init(), operator()(), and serialize().

◆ m_upper

RealVector shark::PolynomialMutator::m_upper

Definition at line 115 of file PolynomialMutation.h.

Referenced by init(), operator()(), and serialize().


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