public final class CompositeAlterer<G extends Gene<?,G>> extends AbstractAlterer<G>
_probability, DEFAULT_ALTER_PROBABILITY
Constructor and Description |
---|
CompositeAlterer(Alterer<G>... alterers)
Deprecated.
Use
of(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.
|
static <G extends Gene<?,G>> |
of(Alterer<G>... alterers)
Combine the given alterers.
|
String |
toString() |
static <G extends Gene<?,G>> |
valueOf(Alterer<G>... alterers)
Deprecated.
Use
of(Alterer[]) instead. |
getProbability, Null
public 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)
of(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)
Alterer
population
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>>
@Deprecated @SafeVarargs public static <G extends Gene<?,G>> CompositeAlterer<G> valueOf(Alterer<G>... alterers)
of(Alterer[])
instead.alterers
- the alterers to combine.NullPointerException
- if one of the alterers is null
.@SafeVarargs public static <G extends Gene<?,G>> CompositeAlterer<G> of(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-2014 Franz Wilhelmstötter (2014-03-07 19:35)