From c35a6806df01481c1b169cd0fc47660ea1cc10fb Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Wed, 14 May 2014 01:32:51 +0100 Subject: Refactored Mutable, commented a little bit of the GUI package --- doc/jcgp/backend/population/Chromosome.html | 4 +- doc/jcgp/backend/population/Connection.html | 4 +- doc/jcgp/backend/population/Input.html | 4 +- doc/jcgp/backend/population/Mutable.html | 306 +++++++++++++++++++++ doc/jcgp/backend/population/Node.html | 4 +- doc/jcgp/backend/population/Output.html | 4 +- doc/jcgp/backend/population/Population.html | 4 +- .../backend/population/class-use/Chromosome.html | 11 +- .../backend/population/class-use/Connection.html | 16 +- doc/jcgp/backend/population/class-use/Input.html | 4 +- doc/jcgp/backend/population/class-use/Mutable.html | 228 +++++++++++++++ doc/jcgp/backend/population/class-use/Node.html | 4 +- doc/jcgp/backend/population/class-use/Output.html | 4 +- .../backend/population/class-use/Population.html | 18 +- doc/jcgp/backend/population/package-frame.html | 4 +- doc/jcgp/backend/population/package-summary.html | 4 +- doc/jcgp/backend/population/package-tree.html | 4 +- doc/jcgp/backend/population/package-use.html | 4 +- 18 files changed, 584 insertions(+), 47 deletions(-) create mode 100644 doc/jcgp/backend/population/Mutable.html create mode 100644 doc/jcgp/backend/population/class-use/Mutable.html (limited to 'doc/jcgp/backend/population') diff --git a/doc/jcgp/backend/population/Chromosome.html b/doc/jcgp/backend/population/Chromosome.html index 75ec3c1..c047c4d 100644 --- a/doc/jcgp/backend/population/Chromosome.html +++ b/doc/jcgp/backend/population/Chromosome.html @@ -2,9 +2,9 @@ - + Chromosome - + diff --git a/doc/jcgp/backend/population/Connection.html b/doc/jcgp/backend/population/Connection.html index b7b5c07..3a76f23 100644 --- a/doc/jcgp/backend/population/Connection.html +++ b/doc/jcgp/backend/population/Connection.html @@ -2,9 +2,9 @@ - + Connection - + diff --git a/doc/jcgp/backend/population/Input.html b/doc/jcgp/backend/population/Input.html index f78663e..a535ebc 100644 --- a/doc/jcgp/backend/population/Input.html +++ b/doc/jcgp/backend/population/Input.html @@ -2,9 +2,9 @@ - + Input - + diff --git a/doc/jcgp/backend/population/Mutable.html b/doc/jcgp/backend/population/Mutable.html new file mode 100644 index 0000000..4ef59eb --- /dev/null +++ b/doc/jcgp/backend/population/Mutable.html @@ -0,0 +1,306 @@ + + + + + +Mutable + + + + + + + + +
+ + + + + + + +
+ + + +
+
jcgp.backend.population
+

Interface Mutable

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    Node, Output
    +
    +
    +
    +
    public interface Mutable
    +
    Mutable declares the expected behaviour of any + part of a chromosome that is mutable, more specifically + nodes or outputs. Inputs are not mutable since they don't have + connections or functions. +

    + This interface provides a way to deal with mutable elements + generically without having to specify whether they are nodes + or outputs. In this way a random mutable element can be picked and + dealt with more easily, facilitating mutations.
    +
    +
    Author:
    +
    Eduardo Pedroni
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      booleancopyOf(Mutable element) +
      Asserts if the specified element is a copy of the elements + this is called on.
      + This method returns true if and only if: + + the elements being compared are not the same instance; + the connections of the compared elements are not the same instance; + the elements have the same function (in the case of Node); + the grid position of the elements themselves are the same; + the grid position of all equivalent connections are the same; + +

      + The relationship computed by this method is: + + symmetric: a.copyOf(b) == b.copyOf(a); + not reflexive: a.copyOf(a) returns false; + not transitive: if a.copyOf(b) is true and b.copyOf(c) is true, a.copyOf(c) is + not necessarily true since it is possible that a == c. +
      +
      voidsetConnection(int index, + Connection newConnection) +
      This method sets the indexed connection to the specified new connection.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setConnection

        +
        void setConnection(int index,
        +                   Connection newConnection)
        +
        This method sets the indexed connection to the specified new connection. + Implementing classes may choose to ignore the given index (such as in the + case of outputs, which only have one connection).
        +
        +
        Parameters:
        +
        index - the connection index to set.
        +
        newConnection - the chromosome element to connect to.
        +
        +
      • +
      + + + +
        +
      • +

        copyOf

        +
        boolean copyOf(Mutable element)
        +
        Asserts if the specified element is a copy of the elements + this is called on.
        + This method returns true if and only if: +
          +
        • the elements being compared are not the same instance;
        • +
        • the connections of the compared elements are not the same instance;
        • +
        • the elements have the same function (in the case of Node);
        • +
        • the grid position of the elements themselves are the same;
        • +
        • the grid position of all equivalent connections are the same;
        • +
        +

        + The relationship computed by this method is: +
          +
        • symmetric: a.copyOf(b) == b.copyOf(a);
        • +
        • not reflexive: a.copyOf(a) returns false;
        • +
        • not transitive: if a.copyOf(b) is true and b.copyOf(c) is true, a.copyOf(c) is + not necessarily true since it is possible that a == c.
        • +
        +
        +
        Parameters:
        +
        element - the mutable element to compare to.
        +
        Returns:
        +
        true if element is a copy of this element.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/doc/jcgp/backend/population/Node.html b/doc/jcgp/backend/population/Node.html index ccd543a..d79d08c 100644 --- a/doc/jcgp/backend/population/Node.html +++ b/doc/jcgp/backend/population/Node.html @@ -2,9 +2,9 @@ - + Node - + diff --git a/doc/jcgp/backend/population/Output.html b/doc/jcgp/backend/population/Output.html index 899b5d1..912b2bb 100644 --- a/doc/jcgp/backend/population/Output.html +++ b/doc/jcgp/backend/population/Output.html @@ -2,9 +2,9 @@ - + Output - + diff --git a/doc/jcgp/backend/population/Population.html b/doc/jcgp/backend/population/Population.html index b28fd28..902847b 100644 --- a/doc/jcgp/backend/population/Population.html +++ b/doc/jcgp/backend/population/Population.html @@ -2,9 +2,9 @@ - + Population - + diff --git a/doc/jcgp/backend/population/class-use/Chromosome.html b/doc/jcgp/backend/population/class-use/Chromosome.html index 4245432..934c1e4 100644 --- a/doc/jcgp/backend/population/class-use/Chromosome.html +++ b/doc/jcgp/backend/population/class-use/Chromosome.html @@ -2,9 +2,9 @@ - + Uses of Class jcgp.backend.population.Chromosome - + @@ -153,6 +153,13 @@ static void +ChromosomeParser.print(Chromosome chromosome, + Resources resources) +
Writes a chromosome to the console in .chr format.
+ + + +static void ChromosomeParser.save(java.io.File file, Chromosome chromosome, Resources resources) diff --git a/doc/jcgp/backend/population/class-use/Connection.html b/doc/jcgp/backend/population/class-use/Connection.html index ab91d1e..ef3fb49 100644 --- a/doc/jcgp/backend/population/class-use/Connection.html +++ b/doc/jcgp/backend/population/class-use/Connection.html @@ -2,9 +2,9 @@ - + Uses of Interface jcgp.backend.population.Connection - + @@ -174,18 +174,18 @@ void -Output.setConnection(int index, +Mutable.setConnection(int index, Connection newConnection) -
When mutating an output, the index parameter - is simply ignored and the output source is - set.
+
This method sets the indexed connection to the specified new connection.
void -Mutable.setConnection(int index, +Output.setConnection(int index, Connection newConnection) -
This method sets the indexed connection to the specified new connection.
+
When mutating an output, the index parameter + is simply ignored and the output source is + set.
diff --git a/doc/jcgp/backend/population/class-use/Input.html b/doc/jcgp/backend/population/class-use/Input.html index 61c38ce..95aa7f2 100644 --- a/doc/jcgp/backend/population/class-use/Input.html +++ b/doc/jcgp/backend/population/class-use/Input.html @@ -2,9 +2,9 @@ - + Uses of Class jcgp.backend.population.Input - + diff --git a/doc/jcgp/backend/population/class-use/Mutable.html b/doc/jcgp/backend/population/class-use/Mutable.html new file mode 100644 index 0000000..bfa8719 --- /dev/null +++ b/doc/jcgp/backend/population/class-use/Mutable.html @@ -0,0 +1,228 @@ + + + + + +Uses of Interface jcgp.backend.population.Mutable + + + + + + + + + + + +
+

Uses of Interface
jcgp.backend.population.Mutable

+
+
+
    +
  • + + + + + + + + + + + + +
    Packages that use Mutable 
    PackageDescription
    jcgp.backend.population 
    +
  • +
  • +
      +
    • + + +

      Uses of Mutable in jcgp.backend.population

      + + + + + + + + + + + + + + + + +
      Classes in jcgp.backend.population that implement Mutable 
      Modifier and TypeClass and Description
      class Node +
      Nodes make up the main part of the chromosome, + where the actual functions are evolved.
      +
      class Output +
      This is a chromosome output.
      +
      + + + + + + + + + + + + +
      Methods in jcgp.backend.population that return Mutable 
      Modifier and TypeMethod and Description
      MutableChromosome.getRandomMutable() +
      This method is useful for mutating chromosomes.
      +
      + + + + + + + + + + + + + + + + + + + + +
      Methods in jcgp.backend.population with parameters of type Mutable 
      Modifier and TypeMethod and Description
      booleanNode.copyOf(Mutable element) 
      booleanMutable.copyOf(Mutable element) +
      Asserts if the specified element is a copy of the elements + this is called on.
      + This method returns true if and only if: + + the elements being compared are not the same instance; + the connections of the compared elements are not the same instance; + the elements have the same function (in the case of Node); + the grid position of the elements themselves are the same; + the grid position of all equivalent connections are the same; + +

      + The relationship computed by this method is: + + symmetric: a.copyOf(b) == b.copyOf(a); + not reflexive: a.copyOf(a) returns false; + not transitive: if a.copyOf(b) is true and b.copyOf(c) is true, a.copyOf(c) is + not necessarily true since it is possible that a == c. +
      +
      booleanOutput.copyOf(Mutable m) 
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/doc/jcgp/backend/population/class-use/Node.html b/doc/jcgp/backend/population/class-use/Node.html index 6dd76ee..6c7f8af 100644 --- a/doc/jcgp/backend/population/class-use/Node.html +++ b/doc/jcgp/backend/population/class-use/Node.html @@ -2,9 +2,9 @@ - + Uses of Class jcgp.backend.population.Node - + diff --git a/doc/jcgp/backend/population/class-use/Output.html b/doc/jcgp/backend/population/class-use/Output.html index 19bd12a..f5ac04b 100644 --- a/doc/jcgp/backend/population/class-use/Output.html +++ b/doc/jcgp/backend/population/class-use/Output.html @@ -2,9 +2,9 @@ - + Uses of Class jcgp.backend.population.Output - + diff --git a/doc/jcgp/backend/population/class-use/Population.html b/doc/jcgp/backend/population/class-use/Population.html index d98d156..befa15f 100644 --- a/doc/jcgp/backend/population/class-use/Population.html +++ b/doc/jcgp/backend/population/class-use/Population.html @@ -2,9 +2,9 @@ - + Uses of Class jcgp.backend.population.Population - + @@ -179,7 +179,7 @@ int -SymbolicRegressionProblem.hasImprovement(Population population)  +TestCaseProblem.hasImprovement(Population population)  abstract int @@ -190,22 +190,18 @@ int -DigitalCircuitProblem.hasImprovement(Population population)  +SymbolicRegressionProblem.hasPerfectSolution(Population population)  -int -SymbolicRegressionProblem.perfectSolutionFound(Population population)  - - abstract int -Problem.perfectSolutionFound(Population population) +Problem.hasPerfectSolution(Population population)
Used to assert whether a given population contains a perfect solution to the problem.
- + int -DigitalCircuitProblem.perfectSolutionFound(Population population)  +DigitalCircuitProblem.hasPerfectSolution(Population population)  diff --git a/doc/jcgp/backend/population/package-frame.html b/doc/jcgp/backend/population/package-frame.html index a4febde..9279d91 100644 --- a/doc/jcgp/backend/population/package-frame.html +++ b/doc/jcgp/backend/population/package-frame.html @@ -2,9 +2,9 @@ - + jcgp.backend.population - + diff --git a/doc/jcgp/backend/population/package-summary.html b/doc/jcgp/backend/population/package-summary.html index c3ab625..738003f 100644 --- a/doc/jcgp/backend/population/package-summary.html +++ b/doc/jcgp/backend/population/package-summary.html @@ -2,9 +2,9 @@ - + jcgp.backend.population - + diff --git a/doc/jcgp/backend/population/package-tree.html b/doc/jcgp/backend/population/package-tree.html index ff3e02f..77b0330 100644 --- a/doc/jcgp/backend/population/package-tree.html +++ b/doc/jcgp/backend/population/package-tree.html @@ -2,9 +2,9 @@ - + jcgp.backend.population Class Hierarchy - + diff --git a/doc/jcgp/backend/population/package-use.html b/doc/jcgp/backend/population/package-use.html index 871296d..352a3cf 100644 --- a/doc/jcgp/backend/population/package-use.html +++ b/doc/jcgp/backend/population/package-use.html @@ -2,9 +2,9 @@ - + Uses of Package jcgp.backend.population - + -- cgit v1.2.3