Skip to content

Commit 177bd2b

Browse files
committed
remove documentation warnings
1 parent c9c94cb commit 177bd2b

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

src/allele.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ impl Allele for Tuple {
5454
}
5555

5656
/// Special Allele subtrait, used for [crate::genotype::RangeGenotype],
57-
/// [crate::genotype::MultiRangeGenotype], [crate::genotype::DynamicRangeGenotype] and
58-
/// [crate::genotype::StaticRangeGenotype]
57+
/// [crate::genotype::MultiRangeGenotype]
5958
pub trait RangeAllele:
6059
Allele
6160
+ Add<Output = Self>

src/fitness.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@ pub type FitnessPopulation<F> = Population<<<F as Fitness>::Genotype as Genotype
4848
///
4949
/// # User implementation
5050
///
51-
/// You must implement [`calculate_for_chromosome(...) -> Option<FitnessValue>`](Fitness::calculate_for_chromosome)
52-
/// which calculates the fitness for a single chromosome.
53-
/// Distributed [Genotype]s have [GenesOwner](crate::chromosome::GenesOwner) chromosomes. These
54-
/// chromosomes have a `genes` field, which can be read for the calculations.
51+
/// You must implement [`calculate_for_chromosome(...) ->
52+
/// Option<FitnessValue>`](Fitness::calculate_for_chromosome) which calculates the fitness for a
53+
/// single chromosome. Chromosomes have a `genes` field, which can be read for the calculations.
5554
///
5655
/// Fitness uses &mut self for performance because it dominates the runtime. Preparing memory
5756
/// allocations on initialization and reusing them for each chromosome can really impact

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! * [Chromosome](crate::chromosome): a chromosome has `genes_size` number of genes
1515
//! * [Allele](crate::genotype::Allele): alleles are the possible values of the genes
1616
//! * Gene: a gene is a combination of position in the chromosome and value of the gene (allele)
17-
//! * [Genes](crate::genotype::Genes): storage trait of the genes for a chromosome, always `Vec<Allele>`
17+
//! * [Genes](crate::chromosome::Genes): storage trait of the genes for a chromosome, always `Vec<Allele>`
1818
//! * [Genotype](crate::genotype): Knows how to generate, mutate and crossover chromosomes efficiently
1919
//! * [Fitness](crate::fitness): knows how to determine the fitness of a chromosome
2020
//!

src/strategy/evolve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ pub enum EvolveVariant {
8787
///
8888
/// There are optional mutation distance limitations for
8989
/// [RangeGenotype](crate::genotype::RangeGenotype) and
90-
/// [MultiRangeGenotype](crate::genotype::MultiRangeGenotype) chromosomes, see [MutationType].
90+
/// [MultiRangeGenotype](crate::genotype::MultiRangeGenotype) chromosomes, see [crate::genotype::MutationType].
9191
///
9292
/// There are reporting hooks in the loop receiving the [EvolveState], which can by handled by an
9393
/// [StrategyReporter] (e.g. [EvolveReporterDuration], [EvolveReporterSimple]). But you are encouraged to
9494
/// roll your own, see [StrategyReporter].
9595
///
9696
/// For [Evolve] the reporting has an additional `on_selection_complete` hook, because
97-
/// that is a more interesting point in the loop. As the population and cardinality are refreshed
97+
/// that is a more interesting point in the loop, as the population and cardinality are refreshed
9898
/// after selection.
9999
/// The `on_generation_complete` contains all the new mutations, most of which will be immediately
100100
/// selected out. This gives the false impression of good cardinality while there is actually little.

src/strategy/hill_climb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub enum HillClimbVariant {
5757
///
5858
/// There are optional mutation distance limitations for
5959
/// [RangeGenotype](crate::genotype::RangeGenotype) and
60-
/// [MultiRangeGenotype](crate::genotype::MultiRangeGenotype) neighbouring chromosomes, see [MutationType].
60+
/// [MultiRangeGenotype](crate::genotype::MultiRangeGenotype) neighbouring chromosomes, see [crate::genotype::MutationType].
6161
/// * With MutationType::Scaled
6262
/// * Mutation distance only on edges of current scale (e.g. -1 and +1 for -1..-1 scale)
6363
/// * Pick random edge for [HillClimbVariant::Stochastic]

src/strategy/permutate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub enum PermutateVariant {
4343
///
4444
/// There is a method to permutate
4545
/// [RangeGenotype](crate::genotype::RangeGenotype) and
46-
/// [MultiRangeGenotype](crate::genotype::MultiRangeGenotype) chromosomes, see [MutationType].
46+
/// [MultiRangeGenotype](crate::genotype::MultiRangeGenotype) chromosomes, see [crate::genotype::MutationType].
4747
/// * With MutationType::Scaled
4848
/// * First scale (index = 0) traverses the whole allele_range(s) with the upper bound of the
4949
/// first scale as step size.

0 commit comments

Comments
 (0)