public final class CompositeAlterer<G extends Gene<?,G>> extends AbstractAlterer<G>
_probability, DEFAULT_ALTER_PROBABILITY| Constructor and Description |
|---|
CompositeAlterer(Alterer<G>... alterers)
Deprecated.
Use
valueOf(Alterer...) instead. |
CompositeAlterer(Seq<Alterer<G>> alterers)
Combine the given alterers.
|
| Modifier and Type | Method and Description |
|---|---|
<C extends Comparable<? super C>> |
alter(Population<G,C> population,
int generation)
Alters (recombine) a given population.
|
CompositeAlterer<G> |
append(Alterer<G> alterer)
Create a new CompositeAlterer with the given alterer appended.
|
boolean |
equals(Object obj) |
ISeq<Alterer<G>> |
getAlterers()
Return the alterers this alterer consists of.
|
int |
hashCode() |
static <T extends Gene<?,T>> |
join(Alterer<T> a1,
Alterer<T> a2)
Joins the given alterer and returns a new CompositeAlterer object.
|
String |
toString() |
static <G extends Gene<?,G>> |
valueOf(Alterer<G>... alterers)
Combine the given alterers.
|
getProbability, Nullpublic CompositeAlterer(Seq<Alterer<G>> alterers)
alterers - the alterers to combine.NullPointerException - if one of the alterers is null.@Deprecated @SafeVarargs public CompositeAlterer(Alterer<G>... alterers)
valueOf(Alterer...) instead.alterers - the alterers to combine.NullPointerException - if one of the alterers is null.public <C extends Comparable<? super C>> int alter(Population<G,C> population, int generation)
Altererpopulation
is empty, nothing is altered.population - The Population to be altered. If the
population is null or empty, nothing is altered.generation - the date of birth (generation) of the altered phenotypes.public CompositeAlterer<G> append(Alterer<G> alterer)
alterer - the alterer to append.NullPointerException - if the given alterer is null.public ISeq<Alterer<G>> getAlterers()
public boolean equals(Object obj)
equals in class AbstractAlterer<G extends Gene<?,G>>@SafeVarargs public static <G extends Gene<?,G>> CompositeAlterer<G> valueOf(Alterer<G>... alterers)
alterers - the alterers to combine.NullPointerException - if one of the alterers is null.public static <T extends Gene<?,T>> CompositeAlterer<T> join(Alterer<T> a1, Alterer<T> a2)
T - the gene type of the alterers.a1 - the first alterer.a2 - the second alterer.NullPointerException - if one of the given alterer is null.© 2007-2013 Franz Wilhelmstötter (2013-12-18 20:17)