Class MultiParentVariation

java.lang.Object
org.moeaframework.core.operator.real.MultiParentVariation
All Implemented Interfaces:
Configurable, Variation
Direct Known Subclasses:
AdaptiveMetropolis, PCX, SPX, UNDX

public abstract class MultiParentVariation extends Object implements Variation
Abstract class for operators that can take a variable number of parents and produce a variable number of offspring.
  • Field Details

    • numberOfParents

      protected int numberOfParents
      The number of parents required by this operator.
    • numberOfOffspring

      protected int numberOfOffspring
      The number of offspring produced by this operator.
  • Constructor Details

    • MultiParentVariation

      public MultiParentVariation(int numberOfParents, int numberOfOffspring)
      Creates a new multi-parent variation operator.
      Parameters:
      numberOfParents - the number of parents required by this operator
      numberOfOffspring - the number of offspring produced by this operator
  • Method Details

    • getNumberOfParents

      public int getNumberOfParents()
      Returns the number of parents required by this operator.
      Returns:
      the number of parents required by this operator
    • setNumberOfParents

      public void setNumberOfParents(int numberOfParents)
      Sets the number of parents required by this operator.
      Parameters:
      numberOfParents - the number of parents required by this operator
    • getNumberOfOffspring

      public int getNumberOfOffspring()
      Returns the number of offspring produced by this operator.
      Returns:
      the number of offspring produced by this operator
    • setNumberOfOffspring

      public void setNumberOfOffspring(int numberOfOffspring)
      Sets the number of offspring produced by this operator.
      Parameters:
      numberOfOffspring - the number of offspring produced by this operator
    • getArity

      public int getArity()
      Description copied from interface: Variation
      Returns the number of solutions that must be supplied to the evolve method.
      Specified by:
      getArity in interface Variation
      Returns:
      the number of solutions that must be supplied to the evolve method