Last active
August 29, 2015 13:57
-
-
Save halfdan/9758330 to your computer and use it in GitHub Desktop.
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
interface Optimizer { | |
double optimize(); | |
} | |
// Many implementations can exist | |
interface Mutation {} | |
// Many implementations can exist | |
interface Selection {} | |
class GeneticAlgorithm implements Optimizer { | |
Mutation mutator; | |
Selection selection; | |
double pc, pm; | |
public GeneticAlgorithm(double pc, double pm) { | |
this.pc = pc; | |
this.pm = pm; | |
} | |
public double optimize() { | |
// compute stuff | |
return 0.0; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment