Class SimpleCellFactory.SimpleCell
- java.lang.Object
-
- dev.nm.solver.multivariate.geneticalgorithm.minimizer.simplegrid.RealScalarFunctionChromosome
-
- dev.nm.solver.multivariate.geneticalgorithm.minimizer.simplegrid.SimpleCellFactory.SimpleCell
-
- All Implemented Interfaces:
Chromosome
,Comparable<Chromosome>
- Direct Known Subclasses:
DEOptimCellFactory.DeOptimCell
,LocalSearchCellFactory.LocalSearchCell
- Enclosing class:
- SimpleCellFactory
public class SimpleCellFactory.SimpleCell extends RealScalarFunctionChromosome
ASimpleCell
implements the two genetic operations.- Mutation by disturbing (scaling) the fitness by a percentage;
- Crossover by taking the midpoint (average) of two cells.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleCell(RealScalarFunction f, Vector x)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Chromosome
crossover(Chromosome other)
Crossover by taking the midpoint.Chromosome
mutate()
Mutate by random disturbs in a neighborhood.
-
-
-
Constructor Detail
-
SimpleCell
protected SimpleCell(RealScalarFunction f, Vector x)
-
-
Method Detail
-
mutate
public Chromosome mutate()
Mutate by random disturbs in a neighborhood.- Returns:
- a mutant chromosome
-
crossover
public Chromosome crossover(Chromosome other)
Crossover by taking the midpoint.- Parameters:
other
- another chromosome- Returns:
- a hybrid chromosome
-
-