|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectiterator.AbstractIterator
iterator.AbstractOptimizer<T>
iterator.AbstractInitialSampleBasedOptimizer<T>
iterator.AbstractPopulationOptimizer<T>
iterator.BasicRealEncodedGA<T>
T - public abstract class BasicRealEncodedGA<T extends BoundConstrainedProblem>
Base class for real-encoded GAs. Uses an n-point crossover such as that in PCGA.
| Field Summary | |
|---|---|
protected DataPointComparer |
comparator
|
protected double |
extrapolationFactor
|
protected double |
interpolationFactor
|
protected cern.colt.matrix.DoubleMatrix1D |
xMutation
|
| Fields inherited from class iterator.AbstractPopulationOptimizer |
|---|
currentBestG, lastBestG, nextBlock |
| Fields inherited from class iterator.AbstractInitialSampleBasedOptimizer |
|---|
uniform |
| Fields inherited from class iterator.AbstractOptimizer |
|---|
doubleFormat, funEvalCount, logWriter |
| Fields inherited from class iterator.AbstractIterator |
|---|
diagnosticString, iter |
| Constructor Summary | |
|---|---|
BasicRealEncodedGA()
|
|
| Method Summary | |
|---|---|
double |
getExtrapolationFactor()
Returns the extrapolation factor. |
double |
getInterpolationFactor()
Returns the interpolation factor. |
Hypercube |
getMutationBox()
Returns the mutation box. |
double |
getMutationFraction()
Returns the mutation fraction. |
double |
getMutationProbability()
Returns the probability of mutation. |
DataPoint[] |
getPopulation()
|
void |
init()
Initialization routine |
protected void |
initializePopulation()
Creates an initial population. |
protected void |
makeChildren(cern.colt.matrix.DoubleMatrix1D xBetter,
cern.colt.matrix.DoubleMatrix1D xWorse,
cern.colt.matrix.DoubleMatrix1D xChild1,
cern.colt.matrix.DoubleMatrix1D xChild2)
Creates children from the given parents and performs mutations, restricted to problem bounds. |
void |
setExtrapolationFactor(double extrapolationFactor)
Sets the extrapolation factor. |
void |
setInterpolationFactor(double interpolationFactor)
Sets the interpolation factor. |
void |
setMutationBox(Hypercube mutationBox)
Sets the mutation box. |
void |
setMutationFraction(double fraction)
Sets the mutation fraction. |
void |
setMutationProbability(double mutationProbability)
Sets the mutation probability. |
| Methods inherited from class iterator.AbstractPopulationOptimizer |
|---|
computeNextPoints, evaluatePoints, getPopulationSize, setInitialSamples, setInitialSamples, setInitialSamples, setPopulationSize, singleIteration |
| Methods inherited from class iterator.AbstractInitialSampleBasedOptimizer |
|---|
getRandomSeed, makeInitialSamples, setRandomSeed |
| Methods inherited from class iterator.AbstractOptimizer |
|---|
clear, dataAdded, dataAdded, dataRemoved, dataRemoved, getDataHandler, getFunEvalCount, getLogFileName, getMaxFunEval, getProblem, isTerminated, iterate, setDataHandler, setFunEvalCount, setLogFileName, setMaxFunEval, setProblem, updateDiagnostics, writeInitialRunLog |
| Methods inherited from class iterator.AbstractIterator |
|---|
isVerbose, printDiagnostics, setVerbose |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface iterator.LoggableIterator |
|---|
getLogFileName, setLogFileName |
| Methods inherited from interface iterator.Iterable |
|---|
isTerminated, iterate |
| Field Detail |
|---|
protected DataPointComparer comparator
protected double extrapolationFactor
protected double interpolationFactor
protected cern.colt.matrix.DoubleMatrix1D xMutation
| Constructor Detail |
|---|
public BasicRealEncodedGA()
| Method Detail |
|---|
public double getExtrapolationFactor()
x_child = extrapolationFactor*x_father +
(1-extrapolationFactor)*x_Mother.
public double getInterpolationFactor()
x_child = interpolationFactor*x_father +
(1-interpolationFactor)*x_Mother.
public Hypercube getMutationBox()
public double getMutationFraction()
public double getMutationProbability()
public DataPoint[] getPopulation()
public void init()
Iterable
init in interface Iterableinit in class AbstractPopulationOptimizer<T extends BoundConstrainedProblem>public void setExtrapolationFactor(double extrapolationFactor)
extrapolationFactor - the given extrapolation factor.public void setInterpolationFactor(double interpolationFactor)
interpolationFactor - the given interpolation factor.public void setMutationBox(Hypercube mutationBox)
mutationBox - the given mutation box.public void setMutationFraction(double fraction)
fraction - the given mutation fraction.public void setMutationProbability(double mutationProbability)
mutationProbability - the given mutation probability.protected void initializePopulation()
protected void makeChildren(cern.colt.matrix.DoubleMatrix1D xBetter,
cern.colt.matrix.DoubleMatrix1D xWorse,
cern.colt.matrix.DoubleMatrix1D xChild1,
cern.colt.matrix.DoubleMatrix1D xChild2)
xBetter - better parent.xWorse - worse parent.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||