File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -797,7 +797,16 @@ where
797
797
writeln ! ( f, "genotype:" ) ?;
798
798
writeln ! ( f, " genes_size: {}" , self . genes_size) ?;
799
799
writeln ! ( f, " mutation_type: {:?}" , self . mutation_type) ?;
800
- writeln ! ( f, " chromosome_permutations_size: uncountable" ) ?;
800
+
801
+ if let Some ( max_scale_index) = self . max_scale_index ( ) {
802
+ let sizes: Vec < BigUint > = ( 0 ..max_scale_index)
803
+ . map ( |scale_index| self . chromosome_permutations_size ( Some ( scale_index) ) )
804
+ . collect ( ) ;
805
+ writeln ! ( f, " chromosome_permutations_size (per scale): {:?}" , sizes) ?;
806
+ } else {
807
+ writeln ! ( f, " chromosome_permutations_size: uncountable" ) ?;
808
+ }
809
+
801
810
writeln ! (
802
811
f,
803
812
" neighbouring_population_size: {}" ,
Original file line number Diff line number Diff line change @@ -41,6 +41,20 @@ pub enum PermutateVariant {
41
41
/// issues, as the permutations are not instantiated at the same time, just iterated over. But it
42
42
/// will take forever...
43
43
///
44
+ /// There is a method to permutate
45
+ /// [RangeGenotype](crate::genotype::RangeGenotype) and
46
+ /// [MultiRangeGenotype](crate::genotype::MultiRangeGenotype) chromosomes. Listed in
47
+ /// descending priority:
48
+ /// * With allele_mutation_scaled_range(s) set on genotype:
49
+ /// * First scale (index = 0) traverses the whole allele_range(s) with the upper bound of the
50
+ /// first scale as step size.
51
+ /// * Other scales (index > 0) center around the best chromomsome of the previous scale,
52
+ /// traversing the previous scale bounds around the best chromosome with the upper bound of the
53
+ /// current scale as step size.
54
+ /// * Scale down after grid is full traversed
55
+ /// * With allele_mutation_range(s) set on genotype: Permutation not supported
56
+ /// * With only allele_range(s) set on genotype: Permutation not supported
57
+ ///
44
58
/// There are reporting hooks in the loop receiving the [PermutateState], which can by handled by an
45
59
/// [StrategyReporter] (e.g. [PermutateReporterDuration], [PermutateReporterSimple]). But you are encouraged to
46
60
/// roll your own, see [StrategyReporter].
You can’t perform that action at this time.
0 commit comments