This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static java.util.Collections.emptyList; | |
| import static io.jenetics.engine.EvolutionResult.toBestPhenotype; | |
| import java.util.List; | |
| import java.util.function.Function; | |
| import java.util.stream.DoubleStream; | |
| import java.util.stream.Stream; | |
| import io.jenetics.DoubleChromosome; | |
| import io.jenetics.DoubleGene; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * This codec creates a split range, where only values between [0, 2) and | |
| * [8, 10) are valid. The valid range is marked with '-' and the invalid | |
| * range with 'x'. | |
| * | |
| * +--+--+--+--+--+--+--+--+--+--+ | |
| * | | | | | | | | | | | | |
| * 0 1 2 3 4 5 6 7 8 9 10 | |
| * |-----|xxxxxxxxxxxxxxxxx|-----| | |
| * ^ |llllllll|rrrrrrrr| ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io.jenetics.DoubleGene; | |
| import io.jenetics.EnumGene; | |
| import io.jenetics.Genotype; | |
| import io.jenetics.engine.Codec; | |
| import io.jenetics.engine.Codecs; | |
| import io.jenetics.engine.Engine; | |
| import io.jenetics.engine.EvolutionResult; | |
| import io.jenetics.util.DoubleRange; | |
| import io.jenetics.util.ProxySorter; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.BufferedInputStream; | |
| import java.io.BufferedOutputStream; | |
| import java.io.EOFException; | |
| import java.io.FileInputStream; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.ObjectInputStream; | |
| import java.io.ObjectOutputStream; | |
| import java.io.OutputStream; | |
| import java.io.UncheckedIOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2023 Franz Wilhelmstötter | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
OlderNewer