|
JAGA Homepage | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaga.reproduction.CombinedReproductionAlgorithm
TODO: Complete these comments.
Project: JAGA - Java API for Genetic Algorithms.
Company: University College London and JAGA.Org (http://www.jaga.org).
Copyright: (c) 2004 by G. Paperin.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, ONLY if you include a note of the original
author(s) in any redistributed/modified copy.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
or see http://www.gnu.org/licenses/gpl.html
| Field Summary | |
|---|---|
private java.lang.Class |
applicableClass
|
private java.util.ArrayList |
combinedAlgorithms
|
| Constructor Summary | |
|---|---|
CombinedReproductionAlgorithm()
|
|
| Method Summary | |
|---|---|
private void |
checkAlgorithmFitsTheOthers(ReproductionAlgorithm algorithm)
|
int |
countCombinedAlgorithms()
|
int |
findReproductionAlgorithm(ReproductionAlgorithm algorithm)
|
java.lang.Class |
getApplicableClass()
Returns the class of individuals handled by this reproduction algorithm. |
ReproductionAlgorithm |
getReproductionAlgorithm(int position)
|
int |
getRequiredNumberOfParents()
Returns, how many individuals are required to produce one new individual whwn using this reproduction algorithm. |
void |
insertReproductionAlgorithm(int position,
ReproductionAlgorithm algorithm)
|
void |
removeReproductionAlgorithm(int position)
|
Individual[] |
reproduce(Individual[] parents,
GAParameterSet params)
Reproduces the specified individuals. |
void |
setReproductionAlgorithm(int position,
ReproductionAlgorithm algorithm)
|
private void |
updateApplicableClass()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.ArrayList combinedAlgorithms
private java.lang.Class applicableClass
| Constructor Detail |
|---|
public CombinedReproductionAlgorithm()
| Method Detail |
|---|
public void insertReproductionAlgorithm(int position,
ReproductionAlgorithm algorithm)
public void setReproductionAlgorithm(int position,
ReproductionAlgorithm algorithm)
public int findReproductionAlgorithm(ReproductionAlgorithm algorithm)
public void removeReproductionAlgorithm(int position)
public ReproductionAlgorithm getReproductionAlgorithm(int position)
public int countCombinedAlgorithms()
private void checkAlgorithmFitsTheOthers(ReproductionAlgorithm algorithm)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionprivate void updateApplicableClass()
public java.lang.Class getApplicableClass()
ReproductionAlgorithm
getApplicableClass in interface ReproductionAlgorithmparents to the method ReproductionAlgorithm.reproduce.
public Individual[] reproduce(Individual[] parents,
GAParameterSet params)
ReproductionAlgorithm
reproduce in interface ReproductionAlgorithmparents - The individuals to reproduce. The type of objects in this
array must be the class returned by getApplicableClass.
The number of objects in this array must be the same as returned by
getRequiredNumberOfParents.params - Experiment parameters.
parents.public int getRequiredNumberOfParents()
ReproductionAlgorithm-1.
getRequiredNumberOfParents in interface ReproductionAlgorithmparents to the
method reproduce or -1 if any length is parmitted.
|
JAGA Homepage | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||