aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/population/Population.java
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2014-03-30 21:07:37 +0100
committerEduardo Pedroni <ep625@york.ac.uk>2014-03-30 21:07:37 +0100
commit04b35ccdad6e18701ede823e333118b0b22907c2 (patch)
tree0e993a5ffee4e63c4a2a6eca137da72b2453f868 /src/jcgp/population/Population.java
parent2bf2d3ac2c578de481ecfd545d58be73c5628996 (diff)
Running into some issues with running the CGP loop in the background with bindings.
Diffstat (limited to 'src/jcgp/population/Population.java')
-rw-r--r--src/jcgp/population/Population.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jcgp/population/Population.java b/src/jcgp/population/Population.java
index 586f556..f5e0517 100644
--- a/src/jcgp/population/Population.java
+++ b/src/jcgp/population/Population.java
@@ -8,15 +8,15 @@ public class Population {
private Chromosome[] chromosomes;
private int fittest;
- public Population(Resources parameters) {
- chromosomes = new Chromosome[((int) parameters.get("popSize"))];
+ public Population(Resources resources) {
+ chromosomes = new Chromosome[(resources.getInt("popSize"))];
for (int c = 0; c < chromosomes.length; c++) {
- chromosomes[c] = new Chromosome(parameters);
+ chromosomes[c] = new Chromosome(resources);
}
}
- public Population(Chromosome parent, Resources parameters) {
- chromosomes = new Chromosome[((int) parameters.get("popSize"))];
+ public Population(Chromosome parent, Resources resources) {
+ chromosomes = new Chromosome[(resources.getInt("popSize"))];
// make a clone for safety
this.chromosomes[0] = new Chromosome(parent);
// generate the rest of the individuals