<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Mar 21 20:35:17 EST 2002 -->
<TITLE>
Population (java-neuralnet API)
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="Population (java-neuralnet API)";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../net/openai/ai/ga/population/PopulationArray.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Population.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<SCRIPT>
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.openai.ai.ga.population</FONT>
<BR>
Class  Population</H2>
<PRE>
java.lang.Object
  |
  +--<B>net.openai.ai.ga.population.Population</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
</DL>
<HR>
<DL>
<DT>public class <B>Population</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>

<P>
The Population is the encapsulation of the individual solutions (<code>
 Cell</code>s that are used to solve the problem. <code>Cell</code>s may
 be added and deleted from this collection. This also implements the
 following functions, which are passed on to the appropriate targets:
 <ul>
   <li>Mature (or age)
   <li>Evaluate
   <li>Combine (or reproduce)
   <li>Mutate
 </ul>
<P>

<P>
<DL>
<DT><B>Since:</B><DD>JDK1.3</DD>
</DD>
<DT><B>Version:</B><DD>%I%, %G%</DD>
</DD>
<DT><B>Author:</B><DD>Jared Grubb</DD>
</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html" TARGET="net.openai.ai.ga.population.Population">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#cells">cells</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The collection of cells that are in this <code>Population</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#toStringQuiet">toStringQuiet</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether to display anything on a <code>toString()</code>
 call.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#toStringUsesCells">toStringUsesCells</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether to call all the <code>Cell</code>s to return
 something as well.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#toStringUsesSize">toStringUsesSize</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether to display the size of the <code>Population</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#toStringUsesTopCell">toStringUsesTopCell</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether the <code>Cell</code> with the highest fitness
 is displayed.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#Population()">Population</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a population using an <code>ArrayList</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#Population(java.util.Collection)">Population</A></B>(java.util.Collection&nbsp;initialCollection)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a population using a given <code>Collection</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#Population(net.openai.ai.ga.population.Population)">Population</A></B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toClone)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a partial clone of this <code>Population</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#Population(net.openai.ai.ga.population.Population, boolean)">Population</A></B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toClone,
           boolean&nbsp;makeEmpty)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a partial clone of this <code>Population</code>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#addCell(net.openai.ai.ga.cell.Cell)">addCell</A></B>(<A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A>&nbsp;toAdd)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a <code>Cell</code> to this <code>Population</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#addCells(net.openai.ai.ga.population.Population)">addCells</A></B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toAdd)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds all the <code>Cell</code>s in the given <code>Population</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#cleanse()">cleanse</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes non-<code>Cell</code> objects from the <code>Collection
 </code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#combine(net.openai.ai.ga.population.PopulationArray)">combine</A></B>(<A HREF="../../../../../net/openai/ai/ga/population/PopulationArray.html">PopulationArray</A>&nbsp;parents)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates new <code>Cell</code>s to add into the <code>Population</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#condemnPopulation(net.openai.ai.ga.population.Population)">condemnPopulation</A></B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toCondemn)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Condemns all the <code>Cell</code>s in the given <code>Population
 </code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#evaluate(net.openai.ai.ga.environment.Environment)">evaluate</A></B>(<A HREF="../../../../../net/openai/ai/ga/environment/Environment.html">Environment</A>&nbsp;env)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells each <code>Cell</code> in this <code>Population</code> to
 evaluate its fitness based upon the <code>Environment</code> given to
 it.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#getCell(int)">getCell</A></B>(int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>Cell</code> from this <code>Population</code> with the
 given index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#getCellArray()">getCellArray</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>Cell[]</code> array representing all the <code>Cell
 </code>s in this population.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Iterator</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#getCellIterator()">getCellIterator</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an Iterator to be used to iterate through all the <Code>
 Cell</code> in this <code>Population</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#getCells()">getCells</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>Collection</code> used internally to represent the
 members of the population</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#getSize()">getSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of <code>Cell</code>s in this <code>Population
 </code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#mature()">mature</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Matures the population.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#mutate(net.openai.ai.ga.population.Population)">mutate</A></B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toMutate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Issues a mutate command to each cell in the passed <code>Population
 </code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#removeAllCellsBut(net.openai.ai.ga.population.Population)">removeAllCellsBut</A></B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toKeep)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all the <code>Cell</code>s from this <code>Population</code>
 except those specified in the passed <code>Population</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#removeAllSameAs(net.openai.ai.ga.cell.Cell)">removeAllSameAs</A></B>(<A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A>&nbsp;toRemove)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all instances of <code>Cell</code> from this <code>
 Population</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#removeCell(net.openai.ai.ga.cell.Cell)">removeCell</A></B>(<A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A>&nbsp;toRemove)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a <code>Cell</code> from this <code>Population</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#removeCells(net.openai.ai.ga.population.Population)">removeCells</A></B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toRemove)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a group of <code>Cell</code>s from this <code>Population
 </code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/openai/ai/ga/population/Population.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>String</code> representation of this <code>
 Population</code>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="cells"><!-- --></A><H3>
cells</H3>
<PRE>
protected java.util.Collection <B>cells</B></PRE>
<DL>
<DD>The collection of cells that are in this <code>Population</code>
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="toStringQuiet"><!-- --></A><H3>
toStringQuiet</H3>
<PRE>
public boolean <B>toStringQuiet</B></PRE>
<DL>
<DD>Determines whether to display anything on a <code>toString()</code>
 call.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="toStringUsesSize"><!-- --></A><H3>
toStringUsesSize</H3>
<PRE>
public boolean <B>toStringUsesSize</B></PRE>
<DL>
<DD>Determines whether to display the size of the <code>Population</code>
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="toStringUsesCells"><!-- --></A><H3>
toStringUsesCells</H3>
<PRE>
public boolean <B>toStringUsesCells</B></PRE>
<DL>
<DD>Determines whether to call all the <code>Cell</code>s to return
 something as well.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="toStringUsesTopCell"><!-- --></A><H3>
toStringUsesTopCell</H3>
<PRE>
public boolean <B>toStringUsesTopCell</B></PRE>
<DL>
<DD>Determines whether the <code>Cell</code> with the highest fitness
 is displayed.
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Population()"><!-- --></A><H3>
Population</H3>
<PRE>
public <B>Population</B>()</PRE>
<DL>
<DD>Creates a population using an <code>ArrayList</code>
<P>
</DL>
<HR>

<A NAME="Population(java.util.Collection)"><!-- --></A><H3>
Population</H3>
<PRE>
public <B>Population</B>(java.util.Collection&nbsp;initialCollection)</PRE>
<DL>
<DD>Creates a population using a given <code>Collection</code>
<P>
<DT><B>Parameters:</B><DD><CODE>initialCollection</CODE> - a <code>Collection</code> to initialize
 		with</DL>
<HR>

<A NAME="Population(net.openai.ai.ga.population.Population)"><!-- --></A><H3>
Population</H3>
<PRE>
public <B>Population</B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toClone)</PRE>
<DL>
<DD>Creates a partial clone of this <code>Population</code>. This
 is not a complete clone, in which each of the <code>Cell</code>s would
 also be cloned; this instead creates a copy of the collection of
 <code>Cell</code>s to which additions and removals do not affect the
 original population. Equilivant to <code>Population(toClone,false)
 </code>.
<P>
</DL>
<HR>

<A NAME="Population(net.openai.ai.ga.population.Population, boolean)"><!-- --></A><H3>
Population</H3>
<PRE>
public <B>Population</B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toClone,
                  boolean&nbsp;makeEmpty)</PRE>
<DL>
<DD>Creates a partial clone of this <code>Population</code>. This
 is not a complete clone, in which each of the <code>Cell</code>s would
 also be cloned; this instead creates a copy of the collection of
 <code>Cell</code>s to which additions and removals do not affect the
 original population.
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="mature()"><!-- --></A><H3>
mature</H3>
<PRE>
public void <B>mature</B>()</PRE>
<DL>
<DD>Matures the population. Calls the mature() method of each of the
 <code>Cell</code>s contained in this <code>Population</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="evaluate(net.openai.ai.ga.environment.Environment)"><!-- --></A><H3>
evaluate</H3>
<PRE>
public void <B>evaluate</B>(<A HREF="../../../../../net/openai/ai/ga/environment/Environment.html">Environment</A>&nbsp;env)</PRE>
<DL>
<DD>Tells each <code>Cell</code> in this <code>Population</code> to
 evaluate its fitness based upon the <code>Environment</code> given to
 it.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>env</CODE> - <code>Environment</code> to evaluate against</DL>
</DD>
</DL>
<HR>

<A NAME="combine(net.openai.ai.ga.population.PopulationArray)"><!-- --></A><H3>
combine</H3>
<PRE>
public void <B>combine</B>(<A HREF="../../../../../net/openai/ai/ga/population/PopulationArray.html">PopulationArray</A>&nbsp;parents)</PRE>
<DL>
<DD>Creates new <code>Cell</code>s to add into the <code>Population</code>.
 The groups of cells to combine are passed as a <code>PopulationArray
 </code>. The first <code>Cell</code> in each <code>Population</code> in
 the group is issued the combine method to return a new <code>Cell</code>
 which is then added into this <code>Population</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>parents</CODE> - a <code>PopulationArray</code> containing sets of
                  parents</DL>
</DD>
</DL>
<HR>

<A NAME="mutate(net.openai.ai.ga.population.Population)"><!-- --></A><H3>
mutate</H3>
<PRE>
public static void <B>mutate</B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toMutate)</PRE>
<DL>
<DD>Issues a mutate command to each cell in the passed <code>Population
 </code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toMutate</CODE> - the target <code>Population</code> for the mutation</DL>
</DD>
</DL>
<HR>

<A NAME="getCellIterator()"><!-- --></A><H3>
getCellIterator</H3>
<PRE>
public java.util.Iterator <B>getCellIterator</B>()</PRE>
<DL>
<DD>Returns an Iterator to be used to iterate through all the <Code>
 Cell</code> in this <code>Population</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>an <code>Iterator</code> on the <code>Cell</code> collection</DL>
</DD>
</DL>
<HR>

<A NAME="addCell(net.openai.ai.ga.cell.Cell)"><!-- --></A><H3>
addCell</H3>
<PRE>
public void <B>addCell</B>(<A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A>&nbsp;toAdd)</PRE>
<DL>
<DD>Adds a <code>Cell</code> to this <code>Population</code>. Does nothing
 when given <code>null</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toAdd</CODE> - the <code>Cell</code> to add</DL>
</DD>
</DL>
<HR>

<A NAME="addCells(net.openai.ai.ga.population.Population)"><!-- --></A><H3>
addCells</H3>
<PRE>
public void <B>addCells</B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toAdd)</PRE>
<DL>
<DD>Adds all the <code>Cell</code>s in the given <code>Population</code>.
 Does nothing on <code>null</code> or an empty <code>Population</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="removeCell(net.openai.ai.ga.cell.Cell)"><!-- --></A><H3>
removeCell</H3>
<PRE>
public boolean <B>removeCell</B>(<A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A>&nbsp;toRemove)</PRE>
<DL>
<DD>Removes a <code>Cell</code> from this <code>Population</code>. Returns
 whether the removal was successful or not. Does nothing when given a
 <code>null</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toRemove</CODE> - the <code>Cell</code> to remove
<DT><B>Returns:</B><DD><code>true</code> on success;
 <code>false</code> otherwise;</DL>
</DD>
</DL>
<HR>

<A NAME="removeCells(net.openai.ai.ga.population.Population)"><!-- --></A><H3>
removeCells</H3>
<PRE>
public void <B>removeCells</B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toRemove)</PRE>
<DL>
<DD>Removes a group of <code>Cell</code>s from this <code>Population
 </code>. Does not indicate whether the removal was successful or not.
 Does nothing when given a <code>null</code> or an empty <code>
 Population</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="removeAllCellsBut(net.openai.ai.ga.population.Population)"><!-- --></A><H3>
removeAllCellsBut</H3>
<PRE>
public void <B>removeAllCellsBut</B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toKeep)</PRE>
<DL>
<DD>Removes all the <code>Cell</code>s from this <code>Population</code>
 except those specified in the passed <code>Population</code>. Does not
 indicate whether the removal was successful or not. Does nothing when
 given a <code>null</code> or an empty <code>Population</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="removeAllSameAs(net.openai.ai.ga.cell.Cell)"><!-- --></A><H3>
removeAllSameAs</H3>
<PRE>
public void <B>removeAllSameAs</B>(<A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A>&nbsp;toRemove)</PRE>
<DL>
<DD>Removes all instances of <code>Cell</code> from this <code>
 Population</code>. Does not indicate whether any removal took place.
 Does nothing when given a <code>null</code> or a non-existant <code>
 Cell</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toRemove</CODE> - the <code>Cell</code> to remove</DL>
</DD>
</DL>
<HR>

<A NAME="getCell(int)"><!-- --></A><H3>
getCell</H3>
<PRE>
public <A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A> <B>getCell</B>(int&nbsp;index)</PRE>
<DL>
<DD>Returns a <code>Cell</code> from this <code>Population</code> with the
 given index.

 <p>This method is not recommended since access to the collection
 via an index is highly unreliable. This method is provided only to
 provide a way for mutation selection algorithm to access random
 elements of the <code>Cell</code> array without having to do constant
 array conversions.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the <code>Cell</code> to return
<DT><B>Returns:</B><DD><code>Cell</code> at the given index
<DT><B>Throws:</B>
<DD><CODE>java.lang.IndexOutOfBoundsException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getCellArray()"><!-- --></A><H3>
getCellArray</H3>
<PRE>
public <A HREF="../../../../../net/openai/ai/ga/cell/Cell.html">Cell</A>[] <B>getCellArray</B>()</PRE>
<DL>
<DD>Returns a <code>Cell[]</code> array representing all the <code>Cell
 </code>s in this population. Returns an empty array when empty.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>Cell[]</code> of all <code>Cell</code>s</DL>
</DD>
</DL>
<HR>

<A NAME="getCells()"><!-- --></A><H3>
getCells</H3>
<PRE>
public java.util.Collection <B>getCells</B>()</PRE>
<DL>
<DD>Returns the <code>Collection</code> used internally to represent the
 members of the population
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD><code>Collection</code> of all <code>Cell</code>s</DL>
</DD>
</DL>
<HR>

<A NAME="condemnPopulation(net.openai.ai.ga.population.Population)"><!-- --></A><H3>
condemnPopulation</H3>
<PRE>
public static void <B>condemnPopulation</B>(<A HREF="../../../../../net/openai/ai/ga/population/Population.html">Population</A>&nbsp;toCondemn)</PRE>
<DL>
<DD>Condemns all the <code>Cell</code>s in the given <code>Population
 </code>. Each <code>Cell</code> in the <code>Population</code> has
 its <code>condemn()</code> called. A <code>null</code> passed
 returns immediately.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>toCondemn</CODE> - the <code>Population</code> to condemn</DL>
</DD>
</DL>
<HR>

<A NAME="getSize()"><!-- --></A><H3>
getSize</H3>
<PRE>
public int <B>getSize</B>()</PRE>
<DL>
<DD>Returns the number of <code>Cell</code>s in this <code>Population
 </code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the number of <code>Cell</code>s</DL>
</DD>
</DL>
<HR>

<A NAME="cleanse()"><!-- --></A><H3>
cleanse</H3>
<PRE>
public void <B>cleanse</B>()</PRE>
<DL>
<DD>Removes non-<code>Cell</code> objects from the <code>Collection
 </code>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a <code>String</code> representation of this <code>
 Population</code>. Uses the following <code>boolean</code> values to
 create the return <code>String</code>:
 <ul>
   <li>toStringQuiet
   <li>toStringUsesSize
   <li>toStringUsesCells
   <li>toStringUsesTopCell
 </ul>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a <code>String</code> representation of the status</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../net/openai/ai/ga/population/PopulationArray.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Population.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<SCRIPT>
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright - 2001 OpenAI Labs. All Rights Reserved.
</BODY>
</HTML>
