Skip to content

Add 'Codec.decode' default method #135

Closed
@jenetics

Description

Add convenience method to the Codec interface: T decode(final Genotype<G> gt).
Instead of

final MyType result = problem.codec().decoder().apply(
    engine.stream()
        .limit(10)
        .collect(EvolutionResult.toBestGenotype())
);

you can write

final MyType result = problem.codec().decode(
    engine.stream()
        .limit(10)
        .collect(EvolutionResult.toBestGenotype())
);

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions