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 --- doc/jcgp/backend/population/MutableElement.html | 306 ++++++++++++++++++++++++ 1 file changed, 306 insertions(+) create mode 100644 doc/jcgp/backend/population/MutableElement.html (limited to 'doc/jcgp/backend/population/MutableElement.html') diff --git a/doc/jcgp/backend/population/MutableElement.html b/doc/jcgp/backend/population/MutableElement.html new file mode 100644 index 0000000..4af7b7e --- /dev/null +++ b/doc/jcgp/backend/population/MutableElement.html @@ -0,0 +1,306 @@ + + + + + +MutableElement + + + + + + + + +
+ + + + + + + +
+ + + +
+
jcgp.backend.population
+

Interface MutableElement

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    Node, Output
    +
    +
    +
    +
    public interface MutableElement
    +
    MutableElement 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(MutableElement 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(MutableElement 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.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + -- cgit v1.2.3