API Documentation

The complete API documentation is generated from rustdoc comments in the source code.

Viewing API Docs

Online

Visit the docs.rs page (when published):

https://docs.rs/fugue-evo

Local Generation

Generate and view locally:

cargo doc --open

Or generate without opening:

cargo doc --no-deps

Docs will be in target/doc/fugue_evo/index.html.

Module Structure

fugue_evo
├── algorithms          # Optimization algorithms
│   ├── simple_ga       # Simple Genetic Algorithm
│   ├── cmaes           # CMA-ES
│   ├── nsga2           # NSGA-II (multi-objective)
│   ├── island          # Island Model
│   └── eda             # EDA/UMDA
├── genome              # Genome types
│   ├── real_vector     # Continuous optimization
│   ├── bit_string      # Binary optimization
│   ├── permutation     # Ordering problems
│   ├── tree            # Genetic programming
│   └── bounds          # Search space bounds
├── operators           # Genetic operators
│   ├── selection       # Selection operators
│   ├── crossover       # Crossover operators
│   └── mutation        # Mutation operators
├── fitness             # Fitness functions
│   ├── traits          # Fitness trait
│   └── benchmarks      # Standard benchmarks
├── population          # Population management
├── termination         # Stopping criteria
├── hyperparameter      # Parameter adaptation
├── interactive         # Human-in-the-loop
├── checkpoint          # State persistence
├── diagnostics         # Statistics and tracking
├── fugue_integration   # PPL integration
└── error               # Error types

Prelude

For convenience, import everything from the prelude:

use fugue_evo::prelude::*;

This imports:

  • All algorithm builders
  • All genome types
  • All operators
  • All fitness traits and benchmarks
  • Common utility types

Key Entry Points

Algorithms

TypeDescription
SimpleGABuilderGeneral-purpose GA
CmaEsCMA-ES optimizer
Nsga2BuilderMulti-objective NSGA-II
IslandModelBuilderParallel island model
InteractiveGABuilderHuman-in-the-loop

Genomes

TypeDescription
RealVectorReal-valued vector
BitStringBinary string
PermutationOrdering
TreeGenomeTree structure

Operators

TypeDescription
TournamentSelectionTournament selection
SbxCrossoverSimulated binary crossover
PolynomialMutationPolynomial mutation

Documentation Conventions

Example Code

All examples in rustdoc are tested (where possible):

/// # Example
///
/// ```
/// use fugue_evo::prelude::*;
/// let genome = RealVector::new(vec![1.0, 2.0, 3.0]);
/// assert_eq!(genome.dimension(), 3);
/// ```

Feature Gates

Feature-gated items are marked:

/// Saves checkpoint to file.
///
/// **Requires feature:** `checkpoint`
#[cfg(feature = "checkpoint")]
pub fn save(&self, path: &Path) -> Result<(), Error>

See Also

Cross-references to related items:

/// Tournament selection operator.
///
/// # See Also
///
/// - [`RouletteWheelSelection`] - Alternative selection
/// - [`RankSelection`] - Rank-based alternative