|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.kumpe.hadooptimizer.OptimizerConfiguration<I>
I - the individuals' typepublic abstract class OptimizerConfiguration<I>
The base class of all Optimizer configurations.
Subclasses have to override clone() to cast the result to themself
and validate() to validate them.
| Constructor Summary | |
|---|---|
OptimizerConfiguration()
|
|
| Method Summary | ||
|---|---|---|
OptimizerConfiguration<I> |
clone()
Returns a shallow copy of this configuration. |
|
static
|
deepClone(T original)
|
|
boolean |
equals(Object obj)
|
|
PopulationReader<I> |
getPopulationReader()
|
|
PopulationWriter<I> |
getPopulationWriter()
|
|
RandomGeneratorFactory |
getRandomGeneratorFactory()
|
|
int |
hashCode()
|
|
protected void |
injectRandomGenerator(Object instance,
org.apache.commons.math.random.RandomGenerator randomGenerator)
Inject the given RandomGenerator object into the passed
instance, if instance is implementing
NeedsRandomGenerator. |
|
void |
injectRandomGenerator(org.apache.commons.math.random.RandomGenerator randomGenerator)
Will inject the given RandomGenerator instance into all contained
components which are implementing NeedsRandomGenerator. |
|
void |
setPopulationReader(PopulationReader<I> populationReader)
|
|
void |
setPopulationWriter(PopulationWriter<I> populationWriter)
|
|
void |
setRandomGeneratorFactory(RandomGeneratorFactory randomGeneratorFactory)
|
|
void |
validate()
Validates the configuration for completeness and correctness. |
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptimizerConfiguration()
| Method Detail |
|---|
public OptimizerConfiguration<I> clone()
Subclasses should override this method to cast the result to themself.
clone in class Objectpublic static <I,T extends OptimizerConfiguration<I>> T deepClone(T original)
public 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.
IllegalStateException - if this configuration is not validpublic 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
injectRandomGenerator(Object, RandomGenerator) for their
additional components.
Calls injectRandomGenerator(Object, RandomGenerator) on the
given populationReader and
populationWriter.
randomGenerator - the RandomGenerator instance to inject
protected final void injectRandomGenerator(Object instance,
org.apache.commons.math.random.RandomGenerator randomGenerator)
RandomGenerator object into the passed
instance, if instance is implementing
NeedsRandomGenerator.
instance - the instance for injecting the randomGenerator, if
neededrandomGenerator - the RandomGenerator object to injectpublic final PopulationReader<I> getPopulationReader()
PopulationReader; null if
none has been setpublic final void setPopulationReader(PopulationReader<I> populationReader)
populationReader - the PopulationReader for this configuration
NullPointerException - if populationReader is nullpublic final PopulationWriter<I> getPopulationWriter()
PopulationWriter; null if
none has been setpublic final void setPopulationWriter(PopulationWriter<I> populationWriter)
populationWriter - the PopulationWriter for this configuration
NullPointerException - if populationWriter is nullpublic RandomGeneratorFactory getRandomGeneratorFactory()
RandomGeneratorFactory; per default this
returns a factory which creates instances of Well44497bpublic void setRandomGeneratorFactory(RandomGeneratorFactory randomGeneratorFactory)
randomGeneratorFactory - the RandomGeneratorFactory for this configuration
NullPointerException - if randomGeneratorFactory is nullpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||