From 4f26361eb08aa09334d1eea0a124110c20d809ce Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sat, 18 Oct 2014 15:21:45 +0200 Subject: Moved javadocs to a different repository for hosting, updated README --- doc/jcgp/backend/population/Node.html | 570 ---------------------------------- 1 file changed, 570 deletions(-) delete mode 100644 doc/jcgp/backend/population/Node.html (limited to 'doc/jcgp/backend/population/Node.html') diff --git a/doc/jcgp/backend/population/Node.html b/doc/jcgp/backend/population/Node.html deleted file mode 100644 index 12e3eea..0000000 --- a/doc/jcgp/backend/population/Node.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - - -Node - - - - - - - - -
- - - - - - - -
- - - -
-
jcgp.backend.population
-

Class Node

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Connection, Mutable
    -
    -
    -
    -
    public class Node
    -extends java.lang.Object
    -implements Mutable, Connection
    -
    Nodes make up the main part of the chromosome, - where the actual functions are evolved. Each node - contains a function and a number of connections. - The node outputs the result of performing its function - on the values of its connections. Nodes therefore - implement both Mutable and Connection - since they can be mutated but also connected to. - Nodes are constructed with a fixed number of connections - (determined by the maximum arity of the function set) - and must be reinstantiated if the experiment arity - changes. -

    - When mutating a node, it is easiest to use mutate(). - Alternatively, you may also perform a specific mutation using - setConnection(...) and setFunction(...).
    -
    -
    Author:
    -
    Eduardo Pedroni
    -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Summary

      - - - - - - - - -
      Constructors 
      Constructor and Description
      Node(Chromosome chromosome, - int row, - int column) -
      Constructs a new instance of Node with the - specified parameters.
      -
      -
    • -
    - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      All Methods Instance Methods Concrete 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. -
      -
      intgetColumn() 
      ConnectiongetConnection(int index) 
      FunctiongetFunction() 
      intgetRow() 
      java.lang.ObjectgetValue() -
      Compute and return the value of this connection.
      -
      voidinitialise(Function newFunction, - Connection... newConnections) -
      Initialises the node with the specified values.
      -
      voidmutate() -
      This method performs an arbitrary mutation on the Mutable.
      -
      voidsetConnection(int index, - Connection newConnection) -
      This method sets the indexed connection to the specified new connection.
      -
      voidsetFunction(Function newFunction) -
      Sets the node function.
      -
      java.lang.StringtoString() 
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        Node

        -
        public Node(Chromosome chromosome,
        -            int row,
        -            int column)
        -
        Constructs a new instance of Node with the - specified parameters. Nodes must contain their - own row and column for ease of copying.
        -
        -
        Parameters:
        -
        chromosome - the chromosome this node belongs to.
        -
        row - the node's row.
        -
        column - the node's column.
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        initialise

        -
        public void initialise(Function newFunction,
        -                       Connection... newConnections)
        -
        Initialises the node with the specified values. - The number of connections passed as argument must - be exactly the same as the experiment arity, or - an IllegalArgumentException will be thrown.
        -
        -
        Parameters:
        -
        newFunction - the node function to set.
        -
        newConnections - the node connections to set.
        -
        -
      • -
      - - - -
        -
      • -

        getColumn

        -
        public int getColumn()
        -
        -
        Returns:
        -
        this node's column.
        -
        -
      • -
      - - - -
        -
      • -

        getRow

        -
        public int getRow()
        -
        -
        Returns:
        -
        this node's row.
        -
        -
      • -
      - - - -
        -
      • -

        getFunction

        -
        public Function getFunction()
        -
        -
        Returns:
        -
        this node's function.
        -
        -
      • -
      - - - -
        -
      • -

        setFunction

        -
        public void setFunction(Function newFunction)
        -
        Sets the node function.
        -
        -
        Parameters:
        -
        newFunction - the new function to set.
        -
        -
      • -
      - - - -
        -
      • -

        getConnection

        -
        public Connection getConnection(int index)
        -
        -
        Parameters:
        -
        index - the connection to return.
        -
        Returns:
        -
        the indexed connection.
        -
        -
      • -
      - - - -
        -
      • -

        setConnection

        -
        public void setConnection(int index,
        -                          Connection newConnection)
        -
        This method sets the indexed connection to the specified new connection. - If the given connection is null or disrespects levels back, it is discarded - and no connections are changed.
        -
        -
        Parameters:
        -
        index - the connection index to set.
        -
        newConnection - the Connection to connect to.
        -
        -
      • -
      - - - -
        -
      • -

        copyOf

        -
        public boolean copyOf(Mutable element)
        -
        Description copied from interface: Mutable
        -
        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.
        • -
        -
        -
        Specified by:
        -
        copyOf in interface Mutable
        -
        Parameters:
        -
        element - the mutable element to compare to.
        -
        Returns:
        -
        true if element is a copy of this element.
        -
        -
      • -
      - - - -
        -
      • -

        getValue

        -
        public java.lang.Object getValue()
        -
        Description copied from interface: Connection
        -
        Compute and return the value of this connection. In - the case of inputs no computation is necessary, this - simply returns the value the input is set to. In the - case of nodes, the value is computed based on the - node's function and the value of its own connections.
        -
        -
        Specified by:
        -
        getValue in interface Connection
        -
        Returns:
        -
        the connection's value.
        -
        -
      • -
      - - - -
        -
      • -

        mutate

        -
        public void mutate()
        -
        Description copied from interface: Mutable
        -
        This method performs an arbitrary mutation on the Mutable. -

        - In the case of nodes, this chooses to mutate a function or connection - fairly, and carries out the required mutation by using the node's own - reference to chromosome. -

        - In the case of outputs, this simply picks a random connection to serve - as the source - any connection is allowed.
        -
        -
        Specified by:
        -
        mutate in interface Mutable
        -
        -
      • -
      - - - -
        -
      • -

        toString

        -
        public java.lang.String toString()
        -
        -
        Overrides:
        -
        toString in class java.lang.Object
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - -
- - - - - - - -
- - - - -- cgit v1.2.3