aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/resources/Resources.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/resources/Resources.java')
-rw-r--r--src/jcgp/backend/resources/Resources.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/jcgp/backend/resources/Resources.java b/src/jcgp/backend/resources/Resources.java
index ebd6fb2..59a29ea 100644
--- a/src/jcgp/backend/resources/Resources.java
+++ b/src/jcgp/backend/resources/Resources.java
@@ -4,6 +4,7 @@ import java.util.Random;
import jcgp.backend.function.Function;
import jcgp.backend.function.FunctionSet;
+import jcgp.backend.modules.problem.BestFitness;
import jcgp.backend.parameters.IntegerParameter;
/**
@@ -15,6 +16,8 @@ import jcgp.backend.parameters.IntegerParameter;
* the actual parameter values can be obtained using getter methods. Note that, for code brevity,
* this class's getters do not start with the word "get". For instance, to get the number of rows,
* one would use {@code rows()} instead of {@code getRows()} which doesn't exist.
+ * The fitness orientation of the problem being solved can also be retrieved using {@code fitnessOrientation()}.
+ * Evolutionary strategies will typically use this to perform selection.
* <br><br>
* In addition to parameters, this class also offers utility methods. Any necessary random numbers
* should be obtained using {@code getRandomInt()} and {@code getRandomDouble()} as these methods
@@ -23,7 +26,7 @@ import jcgp.backend.parameters.IntegerParameter;
* Finally, printing to the console should be done via the resources using the report and print
* methods, so that these prints also get sent to the GUI console (if one is present).
*
- * @see Parameter, Console, FunctionSet
+ * @see jcgp.backend.parameters.Parameter
* @author Eduardo Pedroni
*
*/
@@ -37,6 +40,8 @@ public class Resources {
protected Console console;
+ protected BestFitness fitnessOrientation;
+
/**
* @return the number of rows.
*/
@@ -135,6 +140,13 @@ public class Resources {
return reportInterval.get();
}
+ /**
+ * @return the fitness orientation.
+ */
+ public BestFitness fitnessOrientation() {
+ return fitnessOrientation;
+ }
+
/*
* Utility functions
*/