|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kumpe.hadooptimizer.Optimizer<I>
I
- the individuals' typepublic abstract class Optimizer<I>
An Optimizer
tries to optimize a given population of individuals to
improve their fitness. The concrete optimization technique depends on the
subclasses implementation.
Subclasses need to implement this optimization technique inside
optimize()
and should override getConfiguration()
to cast
the result to the appropriate OptimizerConfiguration
's subtype.
The implementations are generally considered to be not thread-safe and not reusable. Every instance should only be used for one optimization. And if the subclass' instance can be reused, external synchronization should be used to ensure that only one optimization runs on a given instance.
Constructor Summary | |
---|---|
Optimizer(OptimizerConfiguration<I> configuration)
Creates a new Optimizer object with the given
OptimizerConfiguration . |
Method Summary | |
---|---|
protected OptimizerConfiguration<I> |
getConfiguration()
Returns the optimizer's configuration. |
protected org.apache.commons.math.random.RandomGenerator |
getRandomGenerator()
|
abstract void |
optimize()
Starts the optimization. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Optimizer(OptimizerConfiguration<I> configuration)
Optimizer
object with the given
OptimizerConfiguration
.
The configuration will be cloned
and validated
.
configuration
- the new optimizer's configuration
NullPointerException
- if configuration
is null
IllegalStateException
- if the given configuration is not validMethod Detail |
---|
protected OptimizerConfiguration<I> getConfiguration()
This method can be overridden to cast the OptimizerConfiguration
to the appropriate subtype for the concrete optimizer implementation.
protected org.apache.commons.math.random.RandomGenerator getRandomGenerator()
public abstract void optimize()
Subclasses need to implement this method with a concrete optimization technique.
OptimizerException
- if a checked exception occurs inside the optimization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |