diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2014-05-04 19:23:52 +0100 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2014-05-04 19:23:52 +0100 |
commit | aa9e74e7f67789f6353fc26e02ee8e68e40609a2 (patch) | |
tree | 3ad4ed8a0717a9983775a38b0cc8d9a10c01302a /src/jcgp/backend/resources | |
parent | c4fc7e307caf03c93c4203aff8960ffcb3ca8737 (diff) |
Added more comments, minor refactorings
Diffstat (limited to 'src/jcgp/backend/resources')
-rw-r--r-- | src/jcgp/backend/resources/Resources.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/jcgp/backend/resources/Resources.java b/src/jcgp/backend/resources/Resources.java index 1f79627..ebd6fb2 100644 --- a/src/jcgp/backend/resources/Resources.java +++ b/src/jcgp/backend/resources/Resources.java @@ -8,21 +8,22 @@ import jcgp.backend.parameters.IntegerParameter; /** * - * The resources class encapsulates all of the resources based on which the program operates. - * Each instance of JCGP contains a single instance of Resources, which gets passed to the selected - * modules as the program executes. + * Encapsulates all of the resources based on which the program operates. + * Each instance of JCGP contains a single instance of {@code Resources}. * <br><br> * The experiment's {@code Resources} object is passed to modules as the program operates, and * 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()}. + * one would use {@code rows()} instead of {@code getRows()} which doesn't exist. * <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()}. Functions from the - * selected function set can be obtained through this class as well. 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). + * should be obtained using {@code getRandomInt()} and {@code getRandomDouble()} as these methods + * use a particular {@code Random} object guaranteed to generate random numbers based on the seed + * parameter. Functions from the selected function set can be obtained through this class as well. + * 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 * @author Eduardo Pedroni * */ |