Package io.jenetics

Interface ShiftMutator.RangeRandom

Enclosing class:
ShiftMutator<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 shift ranges objects for shifting sequences of a given length.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Random shift range generator, which creates shifter with uniformly distributed shifting points.
  • Method Summary

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

    • UNIFORM

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

    • newRange

      Create a new random shift range for shifting sequences with a given length.
      Parameters:
      random - the random generator to be used for creating a new shifter
      length - the length of the sequence to be shifted
      Returns:
      a new randomly created shifter
    • of

      static ShiftMutator.RangeRandom of(Sampler lengthSampler, Sampler indexSampler)
      Create a new random shift range generator, which uses the given distributions for creating the shift 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 shift generator with the given parameters
    • of

      static ShiftMutator.RangeRandom of(Sampler lengthSampler)
      Create a new random shift 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: