From aa9e74e7f67789f6353fc26e02ee8e68e40609a2 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 4 May 2014 19:23:52 +0100 Subject: Added more comments, minor refactorings --- src/jcgp/backend/resources/Resources.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/jcgp/backend/resources') 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}. *

* 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. *

* 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 * */ -- cgit v1.2.3