|
Last change
on this file since 728 was
193,
checked in by Maciej Komosinski, 12 years ago
|
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
|
File size:
532 bytes
|
| Line | |
|---|
| 1 | package cecj.problems; |
|---|
| 2 | |
|---|
| 3 | import cecj.interaction.InteractionResult; |
|---|
| 4 | import cecj.utils.Pair; |
|---|
| 5 | import ec.EvolutionState; |
|---|
| 6 | import ec.Individual; |
|---|
| 7 | import ec.Problem; |
|---|
| 8 | |
|---|
| 9 | public abstract class TestBasedProblem extends Problem implements CoevolutionaryProblem { |
|---|
| 10 | |
|---|
| 11 | public abstract Pair<? extends InteractionResult> test(EvolutionState state, |
|---|
| 12 | Individual candidate, Individual test); |
|---|
| 13 | |
|---|
| 14 | public boolean solves(EvolutionState state, Individual candidate, Individual test) { |
|---|
| 15 | return (test(state, candidate, test).first.getNumericValue() > 0); |
|---|
| 16 | } |
|---|
| 17 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.