Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Felix Reimann
committed
Sep 26, 2018
1 parent
b8a613e
commit 53f13bc
Showing
11 changed files
with
181 additions
and
202 deletions.
There are no files selected for viewing
This file contains 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
17 changes: 2 additions & 15 deletions
17
opt4j-core/src/test/java/org/opt4j/core/DefaultIndividualFactoryTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,14 @@ | ||
package org.opt4j.core; | ||
|
||
import org.opt4j.core.genotype.PermutationGenotype; | ||
import org.opt4j.core.problem.Creator; | ||
|
||
import com.google.inject.Provider; | ||
|
||
public class DefaultIndividualFactoryTest extends AbstractIndividualFactoryTest { | ||
protected Individual individual = new Individual(); | ||
protected PermutationGenotype<Object> genotype = new PermutationGenotype<Object>(); | ||
protected PermutationGenotype<Object> genotype = new PermutationGenotype<>(); | ||
|
||
@Override | ||
public AbstractIndividualFactory<Individual> getFactory() { | ||
return new DefaultIndividualFactory(new Provider<Individual>() { | ||
@Override | ||
public Individual get() { | ||
return individual; | ||
} | ||
}, new Creator<Genotype>() { | ||
@Override | ||
public Genotype create() { | ||
return genotype; | ||
} | ||
}); | ||
return new DefaultIndividualFactory(() -> individual, () -> genotype); | ||
} | ||
|
||
} |
This file contains 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 file contains 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
Oops, something went wrong.