diff options
Diffstat (limited to 'doc/jcgp/backend/population')
18 files changed, 210 insertions, 154 deletions
diff --git a/doc/jcgp/backend/population/Chromosome.html b/doc/jcgp/backend/population/Chromosome.html index c047c4d..bdd49f4 100644 --- a/doc/jcgp/backend/population/Chromosome.html +++ b/doc/jcgp/backend/population/Chromosome.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>Chromosome</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> @@ -412,6 +412,22 @@ implements java.lang.Comparable<<a href="../../../jcgp/backend/population/Chr </dl> </li> </ul> +<a name="getInput-int-"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getInput</h4> +<pre>public <a href="../../../jcgp/backend/population/Input.html" title="class in jcgp.backend.population">Input</a> getInput(int index)</pre> +<div class="block">Returns a reference to the indexed input.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>index</code> - the input index.</dd> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the input reference.</dd> +</dl> +</li> +</ul> <a name="getNode-int-int-"> <!-- --> </a> @@ -446,22 +462,6 @@ implements java.lang.Comparable<<a href="../../../jcgp/backend/population/Chr </dl> </li> </ul> -<a name="getInput-int-"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>getInput</h4> -<pre>public <a href="../../../jcgp/backend/population/Input.html" title="class in jcgp.backend.population">Input</a> getInput(int index)</pre> -<div class="block">Returns a reference to the indexed input.</div> -<dl> -<dt><span class="paramLabel">Parameters:</span></dt> -<dd><code>index</code> - the input index.</dd> -<dt><span class="returnLabel">Returns:</span></dt> -<dd>the input reference.</dd> -</dl> -</li> -</ul> <a name="getFitness--"> <!-- --> </a> diff --git a/doc/jcgp/backend/population/Connection.html b/doc/jcgp/backend/population/Connection.html index 3a76f23..1e51eda 100644 --- a/doc/jcgp/backend/population/Connection.html +++ b/doc/jcgp/backend/population/Connection.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>Connection</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> diff --git a/doc/jcgp/backend/population/Input.html b/doc/jcgp/backend/population/Input.html index a535ebc..234d473 100644 --- a/doc/jcgp/backend/population/Input.html +++ b/doc/jcgp/backend/population/Input.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>Input</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> diff --git a/doc/jcgp/backend/population/Mutable.html b/doc/jcgp/backend/population/Mutable.html index 4ef59eb..c02cff0 100644 --- a/doc/jcgp/backend/population/Mutable.html +++ b/doc/jcgp/backend/population/Mutable.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>Mutable</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> @@ -113,8 +113,8 @@ var activeTableTab = "activeTableTab"; <br><br> 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.</div> + or outputs. When mutating a mutable, <code>mutate()</code> is guaranteed + to perform a fair mutation.</div> <dl> <dt><span class="simpleTagLabel">Author:</span></dt> <dd>Eduardo Pedroni</dd> @@ -162,9 +162,8 @@ var activeTableTab = "activeTableTab"; </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>void</code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Mutable.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 class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Mutable.html#mutate--">mutate</a></span>()</code> +<div class="block">This method performs an arbitrary mutation on the <code>Mutable</code>.</div> </td> </tr> </table> @@ -182,22 +181,21 @@ var activeTableTab = "activeTableTab"; <!-- --> </a> <h3>Method Detail</h3> -<a name="setConnection-int-jcgp.backend.population.Connection-"> +<a name="mutate--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> -<h4>setConnection</h4> -<pre>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. - Implementing classes may choose to ignore the given index (such as in the - case of outputs, which only have one connection).</div> -<dl> -<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> -</dl> +<h4>mutate</h4> +<pre>void mutate()</pre> +<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> </li> </ul> <a name="copyOf-jcgp.backend.population.Mutable-"> 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> diff --git a/doc/jcgp/backend/population/Output.html b/doc/jcgp/backend/population/Output.html index 912b2bb..98897d4 100644 --- a/doc/jcgp/backend/population/Output.html +++ b/doc/jcgp/backend/population/Output.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>Output</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}; +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -120,7 +120,11 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf type of mutable element with a single connection. It returns the value of its single connection, but it may not be connected to - it terminates a chromosome - active connection path.</div> + active connection path. + <br><br> + When mutating an output, it is easiest to use <code>mutate()</code>. + Alternatively, you may also perform a specific mutation using + <code>setSource(...)</code>.</div> <dl> <dt><span class="simpleTagLabel">Author:</span></dt> <dd>Eduardo Pedroni</dd> @@ -193,7 +197,10 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>void</code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Output.html#getActiveNodes-java.util.ArrayList-">getActiveNodes</a></span>(java.util.ArrayList<<a href="../../../jcgp/backend/population/Node.html" title="class in jcgp.backend.population">Node</a>> activeNodes)</code> </td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Output.html#getActiveNodes-java.util.ArrayList-">getActiveNodes</a></span>(java.util.ArrayList<<a href="../../../jcgp/backend/population/Node.html" title="class in jcgp.backend.population">Node</a>> activeNodes)</code> +<div class="block">Calls <code>getActive(...)</code> on this output's + source.</div> +</td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>int</code></td> @@ -205,14 +212,17 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>void</code></td> -<td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Output.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">When mutating an output, the index parameter - is simply ignored and the output source is - set.</div> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Output.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="i6" class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Output.html#setSource-jcgp.backend.population.Connection-">setSource</a></span>(<a href="../../../jcgp/backend/population/Connection.html" title="interface in jcgp.backend.population">Connection</a> newConnection)</code> +<div class="block">This method sets the output source to the specified connection.</div> +</td> +</tr> +<tr id="i7" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../jcgp/backend/population/Output.html#toString--">toString</a></span>()</code> </td> </tr> @@ -283,45 +293,54 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf <li class="blockList"> <h4>getIndex</h4> <pre>public int getIndex()</pre> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>this output's index.</dd> +</dl> </li> </ul> -<a name="getSource--"> +<a name="setSource-jcgp.backend.population.Connection-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> -<h4>getSource</h4> -<pre>public <a href="../../../jcgp/backend/population/Connection.html" title="interface in jcgp.backend.population">Connection</a> getSource()</pre> +<h4>setSource</h4> +<pre>public void setSource(<a href="../../../jcgp/backend/population/Connection.html" title="interface in jcgp.backend.population">Connection</a> newConnection)</pre> +<div class="block">This method sets the output source to the specified connection.</div> +<dl> +<dt><span class="paramLabel">Parameters:</span></dt> +<dd><code>newConnection</code> - the <code>Connection</code> to connect to.</dd> +</dl> </li> </ul> -<a name="getActiveNodes-java.util.ArrayList-"> +<a name="getSource--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> -<h4>getActiveNodes</h4> -<pre>public void getActiveNodes(java.util.ArrayList<<a href="../../../jcgp/backend/population/Node.html" title="class in jcgp.backend.population">Node</a>> activeNodes)</pre> +<h4>getSource</h4> +<pre>public <a href="../../../jcgp/backend/population/Connection.html" title="interface in jcgp.backend.population">Connection</a> getSource()</pre> +<dl> +<dt><span class="returnLabel">Returns:</span></dt> +<dd>the source of this output's value.</dd> +</dl> </li> </ul> -<a name="setConnection-int-jcgp.backend.population.Connection-"> +<a name="getActiveNodes-java.util.ArrayList-"> <!-- --> </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">When mutating an output, the index parameter - is simply ignored and the output source is - set.</div> +<h4>getActiveNodes</h4> +<pre>public void getActiveNodes(java.util.ArrayList<<a href="../../../jcgp/backend/population/Node.html" title="class in jcgp.backend.population">Node</a>> activeNodes)</pre> +<div class="block">Calls <code>getActive(...)</code> on this output's + source. This kicks off a recursive process whereby + all nodes connected to this output are added to the + specified list of nodes. This is used to create a + list of all active nodes.</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> -<dt><span class="seeLabel">See Also:</span></dt> -<dd><a href="../../../jcgp/backend/population/Mutable.html#setConnection-int-jcgp.backend.population.Connection-"><code>Mutable.setConnection(int, jcgp.backend.population.Connection)</code></a></dd> +<dd><code>activeNodes</code> - the list to add all active nodes to.</dd> </dl> </li> </ul> @@ -361,6 +380,28 @@ implements <a href="../../../jcgp/backend/population/Mutable.html" title="interf </dl> </li> </ul> +<a name="mutate--"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<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#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> <a name="toString--"> <!-- --> </a> diff --git a/doc/jcgp/backend/population/Population.html b/doc/jcgp/backend/population/Population.html index 902847b..36e0af4 100644 --- a/doc/jcgp/backend/population/Population.html +++ b/doc/jcgp/backend/population/Population.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>Population</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> diff --git a/doc/jcgp/backend/population/class-use/Chromosome.html b/doc/jcgp/backend/population/class-use/Chromosome.html index 934c1e4..ec43d21 100644 --- a/doc/jcgp/backend/population/class-use/Chromosome.html +++ b/doc/jcgp/backend/population/class-use/Chromosome.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>Uses of Class jcgp.backend.population.Chromosome</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> @@ -237,10 +237,9 @@ </td> </tr> <tr class="rowColor"> -<td class="colLast"><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="colLast"><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> diff --git a/doc/jcgp/backend/population/class-use/Connection.html b/doc/jcgp/backend/population/class-use/Connection.html index ef3fb49..035a973 100644 --- a/doc/jcgp/backend/population/class-use/Connection.html +++ b/doc/jcgp/backend/population/class-use/Connection.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>Uses of Interface jcgp.backend.population.Connection</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> @@ -170,22 +170,14 @@ <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">Node.</span><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> </td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><span class="typeNameLabel">Mutable.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/population/Mutable.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 class="rowColor"> +<tr class="altColor"> <td class="colFirst"><code>void</code></td> -<td class="colLast"><span class="typeNameLabel">Output.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/population/Output.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">When mutating an output, the index parameter - is simply ignored and the output source is - set.</div> +<td class="colLast"><span class="typeNameLabel">Output.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/population/Output.html#setSource-jcgp.backend.population.Connection-">setSource</a></span>(<a href="../../../../jcgp/backend/population/Connection.html" title="interface in jcgp.backend.population">Connection</a> newConnection)</code> +<div class="block">This method sets the output source to the specified connection.</div> </td> </tr> </tbody> diff --git a/doc/jcgp/backend/population/class-use/Input.html b/doc/jcgp/backend/population/class-use/Input.html index 95aa7f2..31af741 100644 --- a/doc/jcgp/backend/population/class-use/Input.html +++ b/doc/jcgp/backend/population/class-use/Input.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>Uses of Class jcgp.backend.population.Input</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> diff --git a/doc/jcgp/backend/population/class-use/Mutable.html b/doc/jcgp/backend/population/class-use/Mutable.html index bfa8719..49c3bb7 100644 --- a/doc/jcgp/backend/population/class-use/Mutable.html +++ b/doc/jcgp/backend/population/class-use/Mutable.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>Uses of Interface jcgp.backend.population.Mutable</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> diff --git a/doc/jcgp/backend/population/class-use/Node.html b/doc/jcgp/backend/population/class-use/Node.html index 6c7f8af..78bc572 100644 --- a/doc/jcgp/backend/population/class-use/Node.html +++ b/doc/jcgp/backend/population/class-use/Node.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>Uses of Class jcgp.backend.population.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> @@ -139,7 +139,10 @@ <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> -<td class="colLast"><span class="typeNameLabel">Output.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/population/Output.html#getActiveNodes-java.util.ArrayList-">getActiveNodes</a></span>(java.util.ArrayList<<a href="../../../../jcgp/backend/population/Node.html" title="class in jcgp.backend.population">Node</a>> activeNodes)</code> </td> +<td class="colLast"><span class="typeNameLabel">Output.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/population/Output.html#getActiveNodes-java.util.ArrayList-">getActiveNodes</a></span>(java.util.ArrayList<<a href="../../../../jcgp/backend/population/Node.html" title="class in jcgp.backend.population">Node</a>> activeNodes)</code> +<div class="block">Calls <code>getActive(...)</code> on this output's + source.</div> +</td> </tr> </tbody> </table> diff --git a/doc/jcgp/backend/population/class-use/Output.html b/doc/jcgp/backend/population/class-use/Output.html index f5ac04b..11933ea 100644 --- a/doc/jcgp/backend/population/class-use/Output.html +++ b/doc/jcgp/backend/population/class-use/Output.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>Uses of Class jcgp.backend.population.Output</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> diff --git a/doc/jcgp/backend/population/class-use/Population.html b/doc/jcgp/backend/population/class-use/Population.html index befa15f..3dc813a 100644 --- a/doc/jcgp/backend/population/class-use/Population.html +++ b/doc/jcgp/backend/population/class-use/Population.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>Uses of Class jcgp.backend.population.Population</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> @@ -162,20 +162,17 @@ <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> -<td class="colLast"><span class="typeNameLabel">SymbolicRegressionProblem.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/modules/problem/SymbolicRegressionProblem.html#evaluate-jcgp.backend.population.Population-jcgp.backend.resources.Resources-">evaluate</a></span>(<a href="../../../../jcgp/backend/population/Population.html" title="class in jcgp.backend.population">Population</a> population, - <a href="../../../../jcgp/backend/resources/Resources.html" title="class in jcgp.backend.resources">Resources</a> resources)</code> </td> +<td class="colLast"><span class="typeNameLabel">SymbolicRegressionProblem.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/modules/problem/SymbolicRegressionProblem.html#evaluate-jcgp.backend.population.Population-">evaluate</a></span>(<a href="../../../../jcgp/backend/population/Population.html" title="class in jcgp.backend.population">Population</a> population)</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>abstract void</code></td> -<td class="colLast"><span class="typeNameLabel">Problem.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/modules/problem/Problem.html#evaluate-jcgp.backend.population.Population-jcgp.backend.resources.Resources-">evaluate</a></span>(<a href="../../../../jcgp/backend/population/Population.html" title="class in jcgp.backend.population">Population</a> population, - <a href="../../../../jcgp/backend/resources/Resources.html" title="class in jcgp.backend.resources">Resources</a> resources)</code> +<td class="colLast"><span class="typeNameLabel">Problem.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/modules/problem/Problem.html#evaluate-jcgp.backend.population.Population-">evaluate</a></span>(<a href="../../../../jcgp/backend/population/Population.html" title="class in jcgp.backend.population">Population</a> population)</code> <div class="block">The most important method of the problem type.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> -<td class="colLast"><span class="typeNameLabel">DigitalCircuitProblem.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/modules/problem/DigitalCircuitProblem.html#evaluate-jcgp.backend.population.Population-jcgp.backend.resources.Resources-">evaluate</a></span>(<a href="../../../../jcgp/backend/population/Population.html" title="class in jcgp.backend.population">Population</a> population, - <a href="../../../../jcgp/backend/resources/Resources.html" title="class in jcgp.backend.resources">Resources</a> resources)</code> </td> +<td class="colLast"><span class="typeNameLabel">DigitalCircuitProblem.</span><code><span class="memberNameLink"><a href="../../../../jcgp/backend/modules/problem/DigitalCircuitProblem.html#evaluate-jcgp.backend.population.Population-">evaluate</a></span>(<a href="../../../../jcgp/backend/population/Population.html" title="class in jcgp.backend.population">Population</a> population)</code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>int</code></td> diff --git a/doc/jcgp/backend/population/package-frame.html b/doc/jcgp/backend/population/package-frame.html index 9279d91..54d8974 100644 --- a/doc/jcgp/backend/population/package-frame.html +++ b/doc/jcgp/backend/population/package-frame.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>jcgp.backend.population</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> diff --git a/doc/jcgp/backend/population/package-summary.html b/doc/jcgp/backend/population/package-summary.html index 738003f..93123d4 100644 --- a/doc/jcgp/backend/population/package-summary.html +++ b/doc/jcgp/backend/population/package-summary.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>jcgp.backend.population</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> diff --git a/doc/jcgp/backend/population/package-tree.html b/doc/jcgp/backend/population/package-tree.html index 77b0330..7abf92d 100644 --- a/doc/jcgp/backend/population/package-tree.html +++ b/doc/jcgp/backend/population/package-tree.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>jcgp.backend.population Class Hierarchy</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> diff --git a/doc/jcgp/backend/population/package-use.html b/doc/jcgp/backend/population/package-use.html index 352a3cf..86fb03a 100644 --- a/doc/jcgp/backend/population/package-use.html +++ b/doc/jcgp/backend/population/package-use.html @@ -2,9 +2,9 @@ <!-- NewPage --> <html lang="en"> <head> -<!-- Generated by javadoc (1.8.0_05) on Mon May 12 23:05:45 BST 2014 --> +<!-- Generated by javadoc (1.8.0_05) on Thu May 22 06:02:33 BST 2014 --> <title>Uses of Package jcgp.backend.population</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> |