aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/parsers')
-rw-r--r--src/jcgp/backend/parsers/ChromosomeParser.java3
-rw-r--r--src/jcgp/backend/parsers/FunctionParser.java10
2 files changed, 7 insertions, 6 deletions
diff --git a/src/jcgp/backend/parsers/ChromosomeParser.java b/src/jcgp/backend/parsers/ChromosomeParser.java
index fe58ff8..ed1399a 100644
--- a/src/jcgp/backend/parsers/ChromosomeParser.java
+++ b/src/jcgp/backend/parsers/ChromosomeParser.java
@@ -11,6 +11,7 @@ import jcgp.backend.population.Connection;
import jcgp.backend.population.Input;
import jcgp.backend.population.Node;
import jcgp.backend.resources.ModifiableResources;
+import jcgp.backend.resources.Resources;
/**
* This class includes a method for parsing .chr files and another
@@ -33,7 +34,7 @@ public abstract class ChromosomeParser {
* @param chromosome the chromosome to configure
* @param resources the experiment resources
*/
- public static void parse(File file, Chromosome chromosome, ModifiableResources resources) {
+ public static void parse(File file, Chromosome chromosome, Resources resources) {
/*
* Count the nodes to make sure the size of the .chr file matches the experiment parameters.
*
diff --git a/src/jcgp/backend/parsers/FunctionParser.java b/src/jcgp/backend/parsers/FunctionParser.java
index 6d6c73b..cc52ce9 100644
--- a/src/jcgp/backend/parsers/FunctionParser.java
+++ b/src/jcgp/backend/parsers/FunctionParser.java
@@ -11,7 +11,7 @@ import jcgp.backend.resources.ModifiableResources;
/**
* Parses the functions from a .par file.
- * Functions marked with a 1 will be enabled,
+ * Functions marked with a 1 are enabled,
* and those marked with 0 are disabled.
*
* @author Eduardo Pedroni
@@ -25,7 +25,7 @@ public abstract class FunctionParser {
try {
fr = new FileReader(file);
} catch (FileNotFoundException e) {
- resources.println("[Parser] Error: could not find " + file.getAbsolutePath() + ".");
+ resources.println("[Parser] Error: could not find " + file.getAbsolutePath());
return;
}
@@ -40,14 +40,14 @@ public abstract class FunctionParser {
int functionIndex = Integer.parseInt(splitString[splitString.length - 1]);
if (Integer.parseInt(splitString[0]) != 0 && !functionSet.isEnabled(functionSet.getFunction(functionIndex))) {
functionSet.enableFunction(functionIndex);
- resources.println("[Parser] Enabled function: " + functionSet.getFunction(functionIndex).getName() + ".");
+ resources.println("[Parser] Enabled function: " + functionSet.getFunction(functionIndex));
} else if (Integer.parseInt(splitString[0]) == 0 && functionSet.isEnabled(functionSet.getFunction(functionIndex))) {
functionSet.disableFunction(functionIndex);
- resources.println("[Parser] Disabled function: " + functionSet.getFunction(functionIndex).getName() + ".");
+ resources.println("[Parser] Disabled function: " + functionSet.getFunction(functionIndex));
}
}
}
in.close();
- resources.println("[Parser] Finished parsing functions.");
+ resources.println("[Parser] Finished parsing functions");
}
}