|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kumpe.hadooptimizer.OptimizerConfiguration<I>
de.kumpe.hadooptimizer.EaOptimizerConfigurationBase<I>
de.kumpe.hadooptimizer.EaOptimizerConfiguration<I>
I
- the individuals' typepublic class EaOptimizerConfiguration<I>
A configuration for a general evolutionary algorithm. Additionally to the
components in EaOptimizerConfigurationBase
it contains:
Recombiner
to
recombine
the selected
pairings to new individuals.
Constructor Summary | |
---|---|
EaOptimizerConfiguration()
|
Method Summary | |
---|---|
EaOptimizerConfiguration<I> |
clone()
Returns a shallow copy of this configuration. |
boolean |
equals(Object obj)
|
Recombiner<I> |
getRecombiner()
|
int |
hashCode()
|
void |
injectRandomGenerator(org.apache.commons.math.random.RandomGenerator randomGenerator)
Will inject the given RandomGenerator instance into all contained
components which are implementing NeedsRandomGenerator . |
void |
setRecombiner(Recombiner<I> recombiner)
|
String |
toString()
|
void |
validate()
Validates the configuration for completeness and correctness. |
Methods inherited from class de.kumpe.hadooptimizer.EaOptimizerConfigurationBase |
---|
getEvaluator, getHalter, getMutator, getParents, isPreserveParents, setEvaluator, setHalter, setMutator, setParents, setPreserveParents |
Methods inherited from class de.kumpe.hadooptimizer.OptimizerConfiguration |
---|
deepClone, getPopulationReader, getPopulationWriter, getRandomGeneratorFactory, injectRandomGenerator, setPopulationReader, setPopulationWriter, setRandomGeneratorFactory |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EaOptimizerConfiguration()
Method Detail |
---|
public EaOptimizerConfiguration<I> clone()
OptimizerConfiguration
Subclasses should override this method to cast the result to themself.
clone
in class OptimizerConfiguration<I>
public void injectRandomGenerator(org.apache.commons.math.random.RandomGenerator randomGenerator)
RandomGenerator
instance into all contained
components which are implementing NeedsRandomGenerator
.
Subclasses must override this method, if they contain additional
components. Then first call this method from the superclass and then call
OptimizerConfiguration.injectRandomGenerator(Object, RandomGenerator)
for their
additional components.
Calls OptimizerConfiguration.injectRandomGenerator(Object, RandomGenerator)
on the
given populationReader
and
populationWriter
.
Additionally calls
OptimizerConfiguration.injectRandomGenerator(Object, RandomGenerator)
on the given
halter
, mutator
and evaluator
.
Additionally calls
OptimizerConfiguration.injectRandomGenerator(Object, RandomGenerator)
on the given
recombiner
.
injectRandomGenerator
in class EaOptimizerConfigurationBase<I>
randomGenerator
- the RandomGenerator
instance to injectpublic void validate()
Subclasses have to override this method, then first call this method from the superclass and then do their own additional validation.
Verifies that a populationReader
and populationWriter
has been set.
Additionally verifies that a halter
,
mutator
and evaluator
has been set.
Additionally verifies that a recombiner
has been set.
validate
in class EaOptimizerConfigurationBase<I>
IllegalStateException
- if this configuration is not validpublic final Recombiner<I> getRecombiner()
Recombiner
; null
if none has
been setpublic final void setRecombiner(Recombiner<I> recombiner)
recombiner
- the Recombiner
for this configuration
NullPointerException
- if recombiner
is null
public int hashCode()
hashCode
in class EaOptimizerConfigurationBase<I>
public boolean equals(Object obj)
equals
in class EaOptimizerConfigurationBase<I>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |