Package io.jenetics

Interface ShuffleMutator.RangeRandom

Enclosing class:
ShuffleMutator<G extends Gene<?,G>,C extends Comparable<? super C>>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Functional interface for creating random range objects for shuffling sequences of a given length.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Random range generator, which creates ranges with uniformly distributed range indexes.
  • Method Summary

    Modifier and Type
    Method
    Description
    newRange(RandomGenerator random, int length)
    Create a new random range for shuffling sequences with a given length.
    of(Sampler lengthSampler)
    Create a new random range generator, which uses the given distributions for creating the shift points.
    of(Sampler lengthSampler, Sampler indexSampler)
    Create a new random range generator, which uses the given distributions for creating the range points.
  • Field Details

    • UNIFORM

      Random range generator, which creates ranges with uniformly distributed range indexes. Both the length and the shift indexes are chosen uniformly.
  • Method Details

    • newRange

      Create a new random range for shuffling sequences with a given length.
      Parameters:
      random - the random generator to be used for creating a new range
      length - the length of the sequence to be shuffled
      Returns:
      a new randomly created shuffle range
    • of

      static ShuffleMutator.RangeRandom of(Sampler lengthSampler, Sampler indexSampler)
      Create a new random range generator, which uses the given distributions for creating the range points.
      Parameters:
      lengthSampler - the sampler used for creating the shifted gene count
      indexSampler - the sampler used for creating the shift indexes
      Returns:
      a new random range generator with the given parameters
    • of

      static ShuffleMutator.RangeRandom of(Sampler lengthSampler)
      Create a new random range generator, which uses the given distributions for creating the shift points. The shift indexes are uniformly distributed.
      Parameters:
      lengthSampler - the sampler used for creating the shifted gene count
      Returns:
      a new random shift generator with the given parameters
      See Also: