/** * Create a new <b>infinite</b> evolution iterator with the given initial * individuals. If an empty {@code Iterable} is given, the engines genotype * factory is used for creating the population. * * @deprecated Marked for removal in the next major version. * @param genotypes the initial individuals used for the evolution iterator. * Missing individuals are created and individuals not needed are * skipped. * @return a new <b>infinite</b> evolution iterator * @throws java.lang.NullPointerException if the given {@code genotypes} is * {@code null}. */ @Deprecated public default Iterator<EvolutionResult<G, C>> iterator(final Iterable<Genotype<G>> genotypes) { return iterator(genotypes, 1); }
/** * Create a new <b>infinite</b> evolution iterator with the given evolution * start. If an empty {@code Population} is given, the engines genotype * factory is used for creating the population. The given population might * be the result of an other engine and this method allows to start the * evolution with the outcome of an different engine. The fitness function * and the fitness scaler are replaced by the one defined for this engine. * * @deprecated Marked for removal in the next major version. * @param start the data the evolution stream starts with * @return a new <b>infinite</b> evolution iterator * @throws java.lang.NullPointerException if the given evolution * {@code start} is {@code null}. */ @Deprecated public default Iterator<EvolutionResult<G, C>> iterator(final EvolutionStart<G, C> start) { return iterator(() -> start); }
/** * Create a new <b>infinite</b> evolution iterator with the given initial * population. If an empty {@code Population} is given, the engines genotype * factory is used for creating the population. The given population might * be the result of an other engine and this method allows to start the * evolution with the outcome of an different engine. The fitness function * and the fitness scaler are replaced by the one defined for this engine. * * @deprecated Marked for removal in the next major version. * @param population the initial individuals used for the evolution iterator. * Missing individuals are created and individuals not needed are * skipped. * @return a new <b>infinite</b> evolution iterator * @throws java.lang.NullPointerException if the given {@code population} is * {@code null}. */ @Deprecated public default Iterator<EvolutionResult<G, C>> iterator(final ISeq<Phenotype<G, C>> population) { return iterator(EvolutionStart.of(population, 1)); }
/** * Create a new <b>infinite</b> evolution iterator with a newly created * population. This is an alternative way for evolution. It lets the user * start, stop and resume the evolution process whenever desired. * * @deprecated Marked for removal in the next major version. * @return a new <b>infinite</b> evolution iterator */ @Deprecated public default Iterator<EvolutionResult<G, C>> iterator() { return iterator(EvolutionStart.of(ISeq.empty(), 1)); }
/** * Create a new <b>infinite</b> evolution iterator with the given initial * population. If an empty {@code Population} is given, the engines genotype * factory is used for creating the population. The given population might * be the result of an other engine and this method allows to start the * evolution with the outcome of an different engine. The fitness function * and the fitness scaler are replaced by the one defined for this engine. * * @deprecated Marked for removal in the next major version. * @param population the initial individuals used for the evolution iterator. * Missing individuals are created and individuals not needed are * skipped. * @param generation the generation the iterator starts from; must be greater * than zero. * @return a new <b>infinite</b> evolution iterator * @throws java.lang.NullPointerException if the given {@code population} is * {@code null}. * @throws IllegalArgumentException if the given {@code generation} is smaller * then one */ @Deprecated public default Iterator<EvolutionResult<G, C>> iterator( final ISeq<Phenotype<G, C>> population, final long generation ) { return iterator(EvolutionStart.of(population, generation)); }
/** * Create a new <b>infinite</b> evolution iterator with the given initial * individuals. If an empty {@code Iterable} is given, the engines genotype * factory is used for creating the population. * * @deprecated Marked for removal in the next major version. * @param genotypes the initial individuals used for the evolution iterator. * Missing individuals are created and individuals not needed are * skipped. * @param generation the generation the stream starts from; must be greater * than zero. * @return a new <b>infinite</b> evolution iterator * @throws java.lang.NullPointerException if the given {@code genotypes} is * {@code null}. * @throws IllegalArgumentException if the given {@code generation} is * smaller then one */ @Deprecated public default Iterator<EvolutionResult<G, C>> iterator( final Iterable<Genotype<G>> genotypes, final long generation ) { return iterator(EvolutionInit.of( ISeq.of(genotypes), generation )); }
/** * Create a new <b>infinite</b> evolution iterator starting with a * previously evolved {@link EvolutionResult}. The iterator is initialized * with the population of the given {@code result} and its total generation * {@link EvolutionResult#getTotalGenerations()}. * * @deprecated Marked for removal in the next major version. * @param result the previously evolved {@code EvolutionResult} * @return a new evolution stream, which continues a previous one * @throws NullPointerException if the given evolution {@code result} is * {@code null} */ @Deprecated public default Iterator<EvolutionResult<G, C>> iterator(final EvolutionResult<G, C> result) { return iterator(EvolutionStart.of( result.getPopulation(), result.getGeneration() )); }