|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kumpe.hadooptimizer.impl.NeedsRandomWrapperBase<EsWrappableMutator>
de.kumpe.hadooptimizer.impl.EsMutatorWrapper
public final class EsMutatorWrapper
Wrapp's a given EsWrappableMutator
to mutate the double[]
-individual nested in an EsIndividual
.
It randomly increases or reduces the EsIndividual
's increment by a
given factor.
Field Summary |
---|
Fields inherited from class de.kumpe.hadooptimizer.impl.NeedsRandomWrapperBase |
---|
delegate |
Constructor Summary | |
---|---|
EsMutatorWrapper(EsWrappableMutator delegate)
Creates a new EsMutatorWrapper wrapping the specified
EsWrappableMutator . |
|
EsMutatorWrapper(EsWrappableMutator delegate,
double incrementFactor)
Creates a new EsMutatorWrapper wrapping the specified
EsWrappableMutator . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
hashCode()
|
EsIndividual |
mutate(EsIndividual individual)
Creates a mutant of the given individual. |
void |
setRandomGenerator(org.apache.commons.math.random.RandomGenerator randomGenerator)
Injects a RandomGenerator instance. |
String |
toString()
|
Methods inherited from class de.kumpe.hadooptimizer.impl.NeedsRandomWrapperBase |
---|
getDelegate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EsMutatorWrapper(EsWrappableMutator delegate)
EsMutatorWrapper
wrapping the specified
EsWrappableMutator
.
delegate
- an EsWrappableMutator
to wrappublic EsMutatorWrapper(EsWrappableMutator delegate, double incrementFactor)
EsMutatorWrapper
wrapping the specified
EsWrappableMutator
.
delegate
- an EsWrappableMutator
to wrapincrementFactor
- the factor by which the current increment is randomly
increased or reducedMethod Detail |
---|
public void setRandomGenerator(org.apache.commons.math.random.RandomGenerator randomGenerator)
NeedsRandomGenerator
RandomGenerator
instance.
setRandomGenerator
in interface NeedsRandomGenerator
setRandomGenerator
in class NeedsRandomWrapperBase<EsWrappableMutator>
randomGenerator
- the new RandomGenerator
instancepublic EsIndividual mutate(EsIndividual individual)
Mutator
The general contract is to not modify the given individual, but return a mutated copy.
mutate
in interface Mutator<EsIndividual>
individual
- the individual to mutate
public int hashCode()
hashCode
in class NeedsRandomWrapperBase<EsWrappableMutator>
public boolean equals(Object obj)
equals
in class NeedsRandomWrapperBase<EsWrappableMutator>
public String toString()
toString
in class NeedsRandomWrapperBase<EsWrappableMutator>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |