From 8189116ea4b5db4675e31dfd04a5687d55e29262 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Tue, 6 May 2014 14:29:37 +0100 Subject: Added javadocs, made minor changes to the comments --- .../backend/modules/problem/TestCaseProblem.html | 427 +++++++++++++++++++++ 1 file changed, 427 insertions(+) create mode 100644 doc/jcgp/backend/modules/problem/TestCaseProblem.html (limited to 'doc/jcgp/backend/modules/problem/TestCaseProblem.html') diff --git a/doc/jcgp/backend/modules/problem/TestCaseProblem.html b/doc/jcgp/backend/modules/problem/TestCaseProblem.html new file mode 100644 index 0000000..663bc0a --- /dev/null +++ b/doc/jcgp/backend/modules/problem/TestCaseProblem.html @@ -0,0 +1,427 @@ + + + + + +TestCaseProblem + + + + + + + + +
+ + + + + + + +
+ + + +
+
jcgp.backend.modules.problem
+

Class TestCaseProblem<T>

+
+
+ +
+
    +
  • +
    +
    Type Parameters:
    +
    T - the data type to be used by the TestCaseProblem.
    +
    +
    +
    Direct Known Subclasses:
    +
    DigitalCircuitProblem, SymbolicRegressionProblem
    +
    +
    +
    +
    public abstract class TestCaseProblem<T>
    +extends Problem
    +
    Abstract model for a problem that uses test cases. A test case + problem is any problem that compares the chromosome output to + an expected output taken from a table of input-output mappings. +

    + This class defines a basic data type for storing test cases, + TestCase, and provides core functionality to add and manipulate + test cases in the problem. A subclass of TestCaseProblem + must simply override parseTestCase() to convert parsed + problem data strings into the required data type (T).
    +
    +
    Author:
    +
    Eduardo Pedroni
    +
    See Also:
    +
    Problem
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TestCaseProblem

        +
        public TestCaseProblem(Resources resources)
        +
        Creates a new TestCaseProblem object.
        +
        +
        Parameters:
        +
        resources - a reference to the experiment's resources.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getTestCases

        +
        public javafx.collections.ObservableList<TestCaseProblem.TestCase<T>> getTestCases()
        +
        +
        Returns:
        +
        a list containing the test cases.
        +
        +
      • +
      + + + +
        +
      • +

        addTestCase

        +
        public final void addTestCase(java.lang.String[] inputs,
        +                              java.lang.String[] outputs)
        +
        Adds test cases to the problem instance as they get parsed from a + problem data file. This template method uses parseTestCase, which + must be implemented by subclasses.
        +
        +
        Parameters:
        +
        inputs - the inputs represented as strings.
        +
        outputs - the outputs represented as strings.
        +
        +
      • +
      + + + +
        +
      • +

        clearTestCases

        +
        public void clearTestCases()
        +
        Remove all test cases.
        +
      • +
      + + + +
        +
      • +

        parseProblemData

        +
        public void parseProblemData(java.io.File file,
        +                             ModifiableResources resources)
        +
        Description copied from class: Problem
        +
        Parses the specified file and uses the parsed data to + set up the problem type instance appropriately. Any necessary + resource changes can be performed using the provided ModifiableResources + instance. +

        + In addition, realisations of this method should update the value of + maxFitness where appropriate, as this may be displayed to the user + if a GUI is in use.
        +
        +
        Specified by:
        +
        parseProblemData in class Problem
        +
        Parameters:
        +
        file - the data file to parse.
        +
        resources - a modifiable reference to the experiment's resources.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + -- cgit v1.2.3