GERARDIUM RUSH - MINERAL CIRCUIT OPTIMIZER v1.0.0
"A powerful tool designed to optimize circuit configurations using advanced genetic algorithms." - by Pentlandite
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
GuidedMutation Class Reference

#include <GuidedMutation.h>

Inheritance diagram for GuidedMutation:
Inheritance graph
Collaboration diagram for GuidedMutation:
Collaboration graph

Public Member Functions

 GuidedMutation (int vectorSize, const Algorithm_Parameters &params)
 Constructs a GuidedMutation object with specified vector size and algorithm parameters.
 
void setIndividual (Individual &individual) override
 Sets the individual to be mutated.
 
void setPopulation (const std::vector< Individual > &population, std::vector< Individual > &selected)
 Performs the guided mutation operation on the individual.
 
void setParents (Individual &offspring, const Individual &parent1, const Individual &parent2)
 Sets the parents and offspring for the crossover operation.
 
void apply (std::mt19937 &generator) override
 Performs the guided mutation operation on the individual.
 
- Public Member Functions inherited from Operator
virtual ~Operator ()=default
 Virtual destructor for the Operator class.
 

Private Attributes

Individualindividual
 
int numUnits
 
double mutationRate
 

Constructor & Destructor Documentation

◆ GuidedMutation()

GuidedMutation::GuidedMutation ( int vectorSize,
const Algorithm_Parameters & params )

Constructs a GuidedMutation object with specified vector size and algorithm parameters.

Parameters
vectorSizeThe size of the vector representing the individual's genetic material.
paramsThe algorithm parameters including the mutation rate.

Member Function Documentation

◆ apply()

void GuidedMutation::apply ( std::mt19937 & generator)
overridevirtual

Performs the guided mutation operation on the individual.

This method performs mutation on the individual's genetic material based on the specified mutation rate. The mutation modifies the genes of the individual to introduce variations according to specific rules or heuristics.

Parameters
generatorThe random number generator used to determine if mutation should occur.

Implements Operator.

◆ setIndividual()

void GuidedMutation::setIndividual ( Individual & individual)
overridevirtual

Sets the individual to be mutated.

Parameters
individualThe individual to be mutated.

Implements Operator.

◆ setParents()

void GuidedMutation::setParents ( Individual & offspring,
const Individual & parent1,
const Individual & parent2 )
inlinevirtual

Sets the parents and offspring for the crossover operation.

This method is not used by the GuidedMutation operator.

Parameters
offspringThe offspring individual to be generated.
parent1The first parent individual.
parent2The second parent individual.

Implements Operator.

◆ setPopulation()

void GuidedMutation::setPopulation ( const std::vector< Individual > & population,
std::vector< Individual > & selected )
inlinevirtual

Performs the guided mutation operation on the individual.

This method performs mutation on the individual's genetic material based on the specified mutation rate. The mutation modifies the genes of the individual to introduce variations according to specific rules or heuristics.

Parameters
generatorThe random number generator used to determine if mutation should occur.

Implements Operator.

Field Documentation

◆ individual

Individual* GuidedMutation::individual
private

Pointer to the individual to be mutated

◆ mutationRate

double GuidedMutation::mutationRate
private

The mutation rate used to determine if mutation should occur

◆ numUnits

int GuidedMutation::numUnits
private

Represents the number of units or types of operations/nodes


The documentation for this class was generated from the following files: