|
JAGA Homepage | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaga.individualRepresentation.booleanFormulas.BooleanFormulaTreeFactory
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 boolean |
allowConstants
|
private java.lang.Class[] |
allowedNodeTypes
|
private int |
maxTreeDepth
|
private int |
numberOfParameters
|
private static java.lang.Class[] |
stoppersWithConsts
|
private static java.lang.Class[] |
stoppersWithoutConsts
|
| Constructor Summary | |
|---|---|
BooleanFormulaTreeFactory()
|
|
BooleanFormulaTreeFactory(int maxTreeDepth,
int numberOfParameters,
java.lang.Class[] allowedNodeTypes,
boolean allowConstants)
|
|
| Method Summary | |
|---|---|
BooleanFormulaTree |
clone(BooleanFormulaTree template,
GAParameterSet params)
|
Individual |
createDefaultIndividual(GAParameterSet params)
Creates a new default individual. |
private BooleanFormulaTreeNode |
createOneNodeOfRandomType(java.lang.Class[] nodeTypes,
GAParameterSet params)
|
Individual |
createRandomIndividual(GAParameterSet params)
Creates a random individual according to this factory's current internal settings and expariment paramanters. |
BooleanFormulaTreeNode |
createRandomNode(int thisDepth,
GAParameterSet params)
|
private BooleanFormulaTreeNode |
createRandomStopNode(GAParameterSet params)
|
Individual |
createSpecificIndividual(java.lang.Object init,
GAParameterSet params)
Creates a new individual and initialises it to the specified value(s). |
boolean |
getAllowConstants()
|
java.lang.Class[] |
getAllowedNodeTypes()
|
int |
getMaxTreeDepth()
|
int |
getNumberOfParameters()
|
void |
setAllowConstants(boolean val)
|
void |
setAllowedNodeTypes(java.lang.Class[] val)
|
void |
setMaxTreeDepth(int maxDepth)
|
void |
setNumberOfParameters(int val)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.Class[] stoppersWithConsts
private static final java.lang.Class[] stoppersWithoutConsts
private int maxTreeDepth
private int numberOfParameters
private java.lang.Class[] allowedNodeTypes
private boolean allowConstants
| Constructor Detail |
|---|
public BooleanFormulaTreeFactory()
public BooleanFormulaTreeFactory(int maxTreeDepth,
int numberOfParameters,
java.lang.Class[] allowedNodeTypes,
boolean allowConstants)
| Method Detail |
|---|
public int getMaxTreeDepth()
public void setMaxTreeDepth(int maxDepth)
public int getNumberOfParameters()
public void setNumberOfParameters(int val)
public java.lang.Class[] getAllowedNodeTypes()
public void setAllowedNodeTypes(java.lang.Class[] val)
public boolean getAllowConstants()
public void setAllowConstants(boolean val)
public Individual createDefaultIndividual(GAParameterSet params)
IndividualsFactory
createDefaultIndividual in interface IndividualsFactoryparams - Experiment parameters.
public Individual createRandomIndividual(GAParameterSet params)
IndividualsFactory
createRandomIndividual in interface IndividualsFactoryparams - Experiment parameters.
public Individual createSpecificIndividual(java.lang.Object init,
GAParameterSet params)
IndividualsFactoryinit can hold any value(s) which this factory
knows to interprete.Individual-objects of the same type as produced by the
factory. If such an Individual-object is passed as the
init-value, a deep copy of the individual should be created
and returned by this method.init-value, but the
value should not be null. This method should create a new
individual and initialise it with the value(s) packed encoded in
init.
createSpecificIndividual in interface IndividualsFactoryinit - Initialisation value(s) for a new individual.params - Experiment parameters.
init.
public BooleanFormulaTree clone(BooleanFormulaTree template,
GAParameterSet params)
public BooleanFormulaTreeNode createRandomNode(int thisDepth,
GAParameterSet params)
private BooleanFormulaTreeNode createRandomStopNode(GAParameterSet params)
private BooleanFormulaTreeNode createOneNodeOfRandomType(java.lang.Class[] nodeTypes,
GAParameterSet params)
|
JAGA Homepage | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||