MOEA Framework 2.12
API Specification

org.moeaframework.core
Interface Variation

All Known Implementing Classes:
AdaptiveMetropolis, AdaptiveMultimethodVariation, BitFlip, CompoundVariation, DifferentialEvolution, DifferentialEvolutionVariation, GAVariation, GrammarCrossover, GrammarMutation, HUX, Insertion, OnePointCrossover, PCX, PM, PMX, PointMutation, Replace, SBX, SelfAdaptiveNormalVariation, SPX, SSX, SubtreeCrossover, Swap, TwoPointCrossover, UM, UNDX, UniformCrossover

public interface Variation

Interface for variation operators. Variation operators manipulate one or more existing solutions, called parents, to produce one or more new solutions, called children or offspring.

A variation operator is type-safe if it checks variable types at runtime and operates only on those variables it supports. Unsupported variables must be left unmodified. A type-safe variation operator must ensure casts are valid and never throw a ClassCastException. A type-safe variation class should indicate this fact by stating "This variation operator is type-safe" in the class comments.

Mixed-type encodings are supported by using type-safe variation operators. Variation operators for each type in the encoding are applied sequentially, each operating on only those variables with the correct type.


Method Summary
 Solution[] evolve(Solution[] parents)
          Evolves one or more parent solutions (specified by getArity) and produces one or more child solutions.
 int getArity()
          Returns the number of solutions that must be supplied to the evolve method.
 

Method Detail

getArity

int getArity()
Returns the number of solutions that must be supplied to the evolve method.

Returns:
the number of solutions that must be supplied to the evolve method

evolve

Solution[] evolve(Solution[] parents)
Evolves one or more parent solutions (specified by getArity) and produces one or more child solutions. By contract, the parents must not be modified. The copy constructor should be used to create copies of the parents with these copies subsequently modified.

Parameters:
parents - the array of parent solutions
Returns:
an array of child solutions
Throws:
IllegalArgumentException - if an incorrect number of parents was supplied (parents.length != getArity())

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!