Package io.jenetics

Interface NumericChromosome<N extends Number & Comparable<? super N>,​G extends NumericGene<N,​G>>

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default byte byteValue()
      Return the byte value of this NumericChromosome at the index 0.
      default byte byteValue​(int index)
      Return the byte value of this NumericChromosome at the given index.
      default double doubleValue()
      Return the double value of this NumericChromosome at the index 0.
      default double doubleValue​(int index)
      Return the double value of this NumericChromosome at the given index.
      default float floatValue()
      Return the float value of this NumericChromosome at the index 0.
      default float floatValue​(int index)
      Return the float value of this NumericChromosome at the given index.
      default int intValue()
      Return the int value of this NumericChromosome at the index 0.
      default int intValue​(int index)
      Return the int value of this NumericChromosome at the given index.
      default long longValue()
      Return the long value of this NumericChromosome at the index 0.
      default long longValue​(int index)
      Return the long value of this NumericChromosome at the given index.
      default short shortValue()
      Return the short value of this NumericChromosome at the index 0.
      default short shortValue​(int index)
      Return the short value of this NumericChromosome at the given index.
    • Method Detail

      • byteValue

        default byte byteValue​(int index)
        Return the byte value of this NumericChromosome at the given index.
        Parameters:
        index - the index of the NumericGene.
        Returns:
        the byte value of the Gene with the given index.
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= length()).
      • byteValue

        default byte byteValue()
        Return the byte value of this NumericChromosome at the index 0.
        Returns:
        the byte value of the Gene with index 0.
      • shortValue

        default short shortValue​(int index)
        Return the short value of this NumericChromosome at the given index.
        Parameters:
        index - the index of the NumericGene.
        Returns:
        the short value of the Gene with the given index.
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= length()).
      • shortValue

        default short shortValue()
        Return the short value of this NumericChromosome at the index 0.
        Returns:
        the short value of the Gene with index 0.
      • intValue

        default int intValue​(int index)
        Return the int value of this NumericChromosome at the given index.
        Parameters:
        index - the index of the NumericGene.
        Returns:
        the int value of the Gene with the given index.
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= length()).
      • intValue

        default int intValue()
        Return the int value of this NumericChromosome at the index 0.
        Returns:
        the int value of the Gene with index 0.
      • longValue

        default long longValue​(int index)
        Return the long value of this NumericChromosome at the given index.
        Parameters:
        index - the index of the NumericGene.
        Returns:
        the long value of the Gene with the given index.
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= length()).
      • longValue

        default long longValue()
        Return the long value of this NumericChromosome at the index 0.
        Returns:
        the long value of the Gene with index 0.
      • floatValue

        default float floatValue​(int index)
        Return the float value of this NumericChromosome at the given index.
        Parameters:
        index - the index of the NumericGene.
        Returns:
        the float value of the Gene with the given index.
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= length()).
      • floatValue

        default float floatValue()
        Return the float value of this NumericChromosome at the index 0.
        Returns:
        the float value of the Gene with index 0.
      • doubleValue

        default double doubleValue​(int index)
        Return the double value of this NumericChromosome at the given index.
        Parameters:
        index - the index of the NumericGene.
        Returns:
        the double value of the Gene with the given index.
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= length()).
      • doubleValue

        default double doubleValue()
        Return the double value of this NumericChromosome at the index 0.
        Returns:
        the double value of the Gene with index 0.