From 88314e71f908efcfc38da3b800319c171a6ccceb Mon Sep 17 00:00:00 2001
From: Eduardo Pedroni <ep625@york.ac.uk>
Date: Fri, 18 Apr 2014 09:08:41 +0100
Subject: Added parsers, did a bit of testing, switched to java8

---
 src/jcgp/backend/resources/ModifiableResources.java | 14 +++++++++-----
 src/jcgp/backend/resources/Resources.java           | 18 +++++++++---------
 2 files changed, 18 insertions(+), 14 deletions(-)

(limited to 'src/jcgp/backend/resources')

diff --git a/src/jcgp/backend/resources/ModifiableResources.java b/src/jcgp/backend/resources/ModifiableResources.java
index 689f846..3841963 100644
--- a/src/jcgp/backend/resources/ModifiableResources.java
+++ b/src/jcgp/backend/resources/ModifiableResources.java
@@ -19,6 +19,10 @@ public class ModifiableResources extends Resources {
 		super();
 	}
 	
+	public void setValues(String filePath) {
+		
+	}
+	
 	/**
 	 * @param rows the rows to set
 	 */
@@ -106,8 +110,8 @@ public class ModifiableResources extends Resources {
 	/**
 	 * @param report the report to set
 	 */
-	public void setReport(int report) {
-		this.report.set(report);
+	public void setReportInterval(int report) {
+		this.reportInterval.set(report);
 	}
 	
 	/**
@@ -197,10 +201,10 @@ public class ModifiableResources extends Resources {
 	/**
 	 * @return the report
 	 */
-	public IntegerParameter getReportParameter() {
-		return report;
+	public IntegerParameter getReportIntervalParameter() {
+		return reportInterval;
 	}
-	
+
 	public void setFunctionSet(FunctionSet functionSet) {
 		this.functionSet = functionSet;
 		setArity(functionSet.getMaxArity());
diff --git a/src/jcgp/backend/resources/Resources.java b/src/jcgp/backend/resources/Resources.java
index c83fa35..0bf1ee1 100644
--- a/src/jcgp/backend/resources/Resources.java
+++ b/src/jcgp/backend/resources/Resources.java
@@ -21,7 +21,7 @@ import jcgp.backend.resources.parameters.ParameterStatus;
 public class Resources {
 	protected IntegerParameter rows, columns, inputs, outputs, populationSize,
 			levelsBack, currentGeneration, generations, currentRun, runs,
-			arity, seed, report;
+			arity, seed, reportInterval;
 
 	protected Random numberGenerator = new Random();
 	protected FunctionSet functionSet;
@@ -124,10 +124,10 @@ public class Resources {
 	}
 
 	/**
-	 * @return the report
+	 * @return the report interval
 	 */
-	public int report() {
-		return report.get();
+	public int reportInterval() {
+		return reportInterval.get();
 	}
 
 	private void createBaseParameters() {
@@ -273,7 +273,7 @@ public class Resources {
 		});
 		numberGenerator.setSeed(seed.get());
 		
-		report = new IntegerParameter(1, "Report", false, false) {
+		reportInterval = new IntegerParameter(1, "Report interval", false, false) {
 			@Override
 			public void validate(Number newValue) {
 				if (newValue.intValue() > generations.get()) {
@@ -325,8 +325,8 @@ public class Resources {
 	 * These are affected by parameter report
 	 */
 	public void reportln(String s) {
-		if (report.get() > 0) {
-			if (currentGeneration.get() % report.get() == 0) {
+		if (reportInterval.get() > 0) {
+			if (currentGeneration.get() % reportInterval.get() == 0) {
 				System.out.println(s);
 				if (console != null) {
 					console.println(s);
@@ -336,8 +336,8 @@ public class Resources {
 	}
 	
 	public void report(String s) {
-		if (report.get() > 0) {
-			if (currentGeneration.get() % report.get() == 0) {
+		if (reportInterval.get() > 0) {
+			if (currentGeneration.get() % reportInterval.get() == 0) {
 				System.out.print(s);
 				if (console != null) {
 					console.print(s);
-- 
cgit v1.2.3