saealib.Mutation¶
Methods
Method Details
- Mutation.__init__()¶
- abstract Mutation.mutate(p, mutate_range, rng=Generator(PCG64) at 0x7FECD0E5BAE0)[source]¶
Execute mutation.
- Parameters:
p (np.ndarray) – Parent individual. shape = (dim,)
mutate_range (tuple) – Tuple of (lower_bound, upper_bound) for mutation.
rng (np.random.Generator, optional) – Random number generator, by default np.random.default_rng()
- Returns:
Mutated individual. shape = (dim,)
- Return type:
np.ndarray