@@ -24,28 +24,29 @@ for later use, when zero-copy actually becomes viable.
2424
2525Now the library is restructured to a simpler form, moving a lot of
2626responsibilities away from ` Genotype ` which was becoming too heavy and
27- centralized: All genes are now ` Vec<Allele> ` and stored on the ` Chromosome `
27+ centralized: All genes are now ` Vec<Allele> ` and owned by the ` Chromosome `
2828(which now only has one implementation, no genotype specific variants anymore).
2929
3030Chromosome recycling has been moved from the ` Genotype ` (` ChromosomeManager ` )
3131to the ` Population ` , the enabling flag is on ` Genotype ` . So when making custom
3232implementations remember to use the population's ` new_chromosome() ` ,
3333` drop_chromomsome() ` , ` truncate() ` , ` truncate_external() ` &
34- ` extend_from_within() ` methods for the chromosomes.
35-
36- However, ` Genotype ` unification proved impossible - each type has fundamentally
37- different requirements. So the best route to allow for easier custom ` Mutate `
38- and ` Crossover ` implementations, was to make them user-genotype specific using
39- an associated type ` Genotype ` on ` Mutate ` and ` Crossover ` traits (following
40- existing ` Fitness ` pattern). The Genotypes now also have some
34+ ` extend_from_within() ` methods for the chromosomes. Or just disable the
35+ recycling (no risk of errors).
36+
37+ However, ` Genotype ` unification still proved impossible - each type has
38+ fundamentally different requirements. So the best route to allow for easier
39+ custom ` Mutate ` and ` Crossover ` implementations, was to make them user-genotype
40+ specific using an associated type ` Genotype ` on ` Mutate ` and ` Crossover ` traits
41+ (following existing ` Fitness ` pattern). The Genotypes now also have some
4142implementation-specific helper methods to support custom implementations:
4243` sample_allele() ` , ` sample_gene_delta() ` , ` sample_gene_index() ` ,
4344` sample_gene_indices() ` .
4445
4546Skip the associated type ` Genotype ` on ` Select ` and ` Extension ` for now, as
4647these mainly work with the chromosome metadata and are not genotype specific.
4748
48- General usage by client is hardly impacted , most is internal.
49+ General usage by client has little impact , most is internal.
4950
5051### Changed
5152* Add associated type ` Genotype ` to ` Mutate ` and ` Crossover ` traits (following
@@ -55,16 +56,17 @@ General usage by client is hardly impacted, most is internal.
5556 trait responsible for the hashing implementation (with ` impl_allele! ` macro
5657 for default implementation)
5758* Moved ` current_scale_index ` from ` StrategyState ` to ` Genotype ` . This is the
58- only change towards ` Genotype ` . The scaling is only implemented by
59+ only change adding ` Genotype ` logic . The scaling is only implemented by
5960 ` RangeGenotype ` and ` MultiRangeGenotype ` , so it felt more genotype specific.
6061 It does make the ` Genotype ` mutable again, which is an accepted tradeoff.
6162
6263### Removed
6364* Remove matrix genotypes (` DynamicMatrixGenotype ` , ` StaticMatrixGenotype ` )
6465* Remove ` ChromosomeManager ` trait
66+ * Remove ` GenesOwner ` and ` GenesPointer ` traits
6567* Remove ` BitGenotype ` - use ` BinaryGenotype ` with ` Vec<bool> ` instead
6668* Remove ` calculate_for_population() ` as the population-level fitness calculation user
67- hook. All is now ` calculate_for_chromosome() `
69+ hook. All is now ` calculate_for_chromosome() ` which can now be compile time guarded
6870
6971## [ 0.20.5] - 2025-05-21
7072### Added
0 commit comments