Interface PopulationFitnessVector.Integer

All Superinterfaces:
PopulationFitnessVector
Enclosing interface:
PopulationFitnessVector

public static interface PopulationFitnessVector.Integer extends PopulationFitnessVector
An interface to a vector of fitnesses, each an int, of a population.
  • Method Details

    • getFitness

      int getFitness(int i)
      Gets the fitness of a population member.
      Parameters:
      i - The index into the population, which must be in the interval [0, size()).
      Returns:
      the fitness of population member i.
    • of

      static PopulationFitnessVector.Integer of(int[] f)
      Creates a PopulationFitnessVector.Integer wrapping a primitive int array.
      Parameters:
      f - The int array to wrap, returned object holds a reference to f and does not clone it.
      Returns:
      a PopulationFitnessVector.Integer wrapping f
    • toIntArray

      default int[] toIntArray()
      Creates a new array of ints containing the elements of this PopulationFitnessVector.Integer.
      Returns:
      an array of ints
    • toDoubleArray

      default double[] toDoubleArray()
      Creates a new array of doubles containing the elements of this PopulationFitnessVector.Integer.
      Returns:
      an array of doubles