feat(operators): add SwapMutation for permutations
Variation that clones the first parent (a Vec<usize> permutation) and swaps two distinct random indices when len >= 2 (spec §11.4). Tests confirm the multiset of contents is preserved.
This commit is contained in:
+1
-1
@@ -16,4 +16,4 @@ pub use crate::pareto::{
|
||||
pareto_compare, pareto_front,
|
||||
};
|
||||
|
||||
pub use crate::operators::{BitFlipMutation, GaussianMutation, RealBounds};
|
||||
pub use crate::operators::{BitFlipMutation, GaussianMutation, RealBounds, SwapMutation};
|
||||
|
||||
Reference in New Issue
Block a user