Interface Engine.Setup<G extends Gene<?,​G>,​C extends Comparable<? super C>>

  • Type Parameters:
    G - the gene type
    C - the fitness result type
    Enclosing class:
    Engine<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.

    @FunctionalInterface
    public static interface Engine.Setup<G extends Gene<?,​G>,​C extends Comparable<? super C>>
    This interface represents a recipe for configuring (setup) a given Engine.Builder. It is mainly used for grouping mutually dependent engine configurations. The following code snippet shows a possible usage example.
    final Engine<CharacterGene, Integer> engine = Engine.builder(problem) .setup(new WeaselProgram<>()) .build();
    Since:
    6.0
    Version:
    6.0
    See Also:
    Engine.Builder.setup(Setup)
    • Method Detail

      • apply

        void apply​(Engine.Builder<G,​C> builder)
        Applies this setup to the given engine builder.
        Parameters:
        builder - the engine builder to setup (configure)