diff options
Diffstat (limited to 'doc/jcgp/backend/population/Node.html')
-rw-r--r-- | doc/jcgp/backend/population/Node.html | 104 |
1 files changed, 65 insertions, 39 deletions
diff --git a/doc/jcgp/backend/population/Node.html b/doc/jcgp/backend/population/Node.html index d79d08c..12e3eea 100644 --- a/doc/jcgp/backend/population/Node.html +++ b/doc/jcgp/backend/population/Node.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:44 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:32 BST 2014 --> <title>Node</title> -<meta name="date" content="2014-05-12"> +<meta name="date" content="2014-05-22"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> @@ -18,7 +18,7 @@ catch(err) { } //--> -var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10}; +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -126,7 +126,11 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf 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.</div> + changes. + <br><br> + When mutating a node, it is easiest to use <code>mutate()</code>. + Alternatively, you may also perform a specific mutation using + <code>setConnection(...)</code> and <code>setFunction(...)</code>.</div> <dl> <dt><span class="simpleTagLabel">Author:</span></dt> <dd>Eduardo Pedroni</dd> @@ -149,10 +153,9 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> -<td class="colOne"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Node.html#Node-jcgp.backend.population.Chromosome-int-int-int-">Node</a></span>(<a href="../../../jcgp/backend/population/Chromosome.html" title="class in jcgp.backend.population">Chromosome</a> chromosome, +<td class="colOne"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Node.html#Node-jcgp.backend.population.Chromosome-int-int-">Node</a></span>(<a href="../../../jcgp/backend/population/Chromosome.html" title="class in jcgp.backend.population">Chromosome</a> chromosome, int row, - int column, - int arity)</code> + int column)</code> <div class="block">Constructs a new instance of <code>Node</code> with the specified parameters.</div> </td> @@ -226,18 +229,24 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Node.html#mutate--">mutate</a></span>()</code> +<div class="block">This method performs an arbitrary mutation on the <code>Mutable</code>.</div> +</td> +</tr> +<tr id="i8" class="altColor"> +<td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Node.html#setConnection-int-jcgp.backend.population.Connection-">setConnection</a></span>(int index, <a href="../../../jcgp/backend/population/Connection.html" title="interface in jcgp.backend.population">Connection</a> newConnection)</code> <div class="block">This method sets the indexed connection to the specified new connection.</div> </td> </tr> -<tr id="i8" class="altColor"> +<tr id="i9" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Node.html#setFunction-jcgp.backend.function.Function-">setFunction</a></span>(<a href="../../../jcgp/backend/function/Function.html" title="class in jcgp.backend.function">Function</a> newFunction)</code> <div class="block">Sets the node function.</div> </td> </tr> -<tr id="i9" class="rowColor"> +<tr id="i10" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Node.html#toString--">toString</a></span>()</code> </td> </tr> @@ -263,7 +272,7 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf <!-- --> </a> <h3>Constructor Detail</h3> -<a name="Node-jcgp.backend.population.Chromosome-int-int-int-"> +<a name="Node-jcgp.backend.population.Chromosome-int-int-"> <!-- --> </a> <ul class="blockListLast"> @@ -271,8 +280,7 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf <h4>Node</h4> <pre>public Node(<a href="../../../jcgp/backend/population/Chromosome.html" title="class in jcgp.backend.population">Chromosome</a> chromosome, int row, - int column, - int arity)</pre> + int column)</pre> <div class="block">Constructs a new instance of <code>Node</code> with the specified parameters. Nodes must contain their own row and column for ease of copying.</div> @@ -281,7 +289,6 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf <dd><code>chromosome</code> - the chromosome this node belongs to.</dd> <dd><code>row</code> - the node's row.</dd> <dd><code>column</code> - the node's column.</dd> -<dd><code>arity</code> - the maximum arity of the experiment.</dd> </dl> </li> </ul> @@ -293,20 +300,6 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf <!-- --> </a> <h3>Method Detail</h3> -<a name="setFunction-jcgp.backend.function.Function-"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>setFunction</h4> -<pre>public void setFunction(<a href="../../../jcgp/backend/function/Function.html" title="class in jcgp.backend.function">Function</a> newFunction)</pre> -<div class="block">Sets the node function.</div> -<dl> -<dt><span class="paramLabel">Parameters:</span></dt> -<dd><code>newFunction</code> - the new function to set.</dd> -</dl> -</li> -</ul> <a name="initialise-jcgp.backend.function.Function-jcgp.backend.population.Connection...-"> <!-- --> </a> @@ -365,6 +358,20 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf </dl> </li> </ul> +<a name="setFunction-jcgp.backend.function.Function-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setFunction</h4> +<pre>public void setFunction(<a href="../../../jcgp/backend/function/Function.html" title="class in jcgp.backend.function">Function</a> newFunction)</pre> +<div class="block">Sets the node function.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>newFunction</code> - the new function to set.</dd> +</dl> +</li> +</ul> <a name="getConnection-int-"> <!-- --> </a> @@ -380,6 +387,24 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf </dl> </li> </ul> +<a name="setConnection-int-jcgp.backend.population.Connection-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setConnection</h4> +<pre>public void setConnection(int index, + <a href="../../../jcgp/backend/population/Connection.html" title="interface in jcgp.backend.population">Connection</a> newConnection)</pre> +<div class="block">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.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>index</code> - the connection index to set.</dd> +<dd><code>newConnection</code> - the <code>Connection</code> to connect to.</dd> +</dl> +</li> +</ul> <a name="copyOf-jcgp.backend.population.Mutable-"> <!-- --> </a> @@ -437,24 +462,25 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf </dl> </li> </ul> -<a name="setConnection-int-jcgp.backend.population.Connection-"> +<a name="mutate--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> -<h4>setConnection</h4> -<pre>public void setConnection(int index, - <a href="../../../jcgp/backend/population/Connection.html" title="interface in jcgp.backend.population">Connection</a> newConnection)</pre> -<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../jcgp/backend/population/Mutable.html#setConnection-int-jcgp.backend.population.Connection-">Mutable</a></code></span></div> -<div class="block">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).</div> +<h4>mutate</h4> +<pre>public void mutate()</pre> +<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../jcgp/backend/population/Mutable.html#mutate--">Mutable</a></code></span></div> +<div class="block">This method performs an arbitrary mutation on the <code>Mutable</code>. + <br><br> + 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. + <br><br> + In the case of outputs, this simply picks a random connection to serve + as the source - any connection is allowed.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> -<dd><code><a href="../../../jcgp/backend/population/Mutable.html#setConnection-int-jcgp.backend.population.Connection-">setConnection</a></code> in interface <code><a href="../../../jcgp/backend/population/Mutable.html" title="interface in jcgp.backend.population">Mutable</a></code></dd> -<dt><span class="paramLabel">Parameters:</span></dt> -<dd><code>index</code> - the connection index to set.</dd> -<dd><code>newConnection</code> - the chromosome element to connect to.</dd> +<dd><code><a href="../../../jcgp/backend/population/Mutable.html#mutate--">mutate</a></code> in interface <code><a href="../../../jcgp/backend/population/Mutable.html" title="interface in jcgp.backend.population">Mutable</a></code></dd> </dl> </li> </ul> |