Interface PopulationFitnessVector.DoubleFitness

All Superinterfaces:
PopulationFitnessVector
All Known Subinterfaces:
PopulationCandidates.DoubleFitness<T>
Enclosing interface:
PopulationFitnessVector

public static interface PopulationFitnessVector.DoubleFitness extends PopulationFitnessVector
An interface to a vector of fitnesses, each a double, of a population.
  • Method Details

    • fitness

      double fitness(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.DoubleFitness of(double[] f)
      Creates a PopulationFitnessVector.DoubleFitness wrapping a primitive double array.
      Parameters:
      f - The double array to wrap, returned object holds a reference to f and does not clone it.
      Returns:
      a PopulationFitnessVector.DoubleFitness wrapping f
    • toDoubleArray

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