galapagos 1.0.0

Simple evolutionary solver
Documentation
  • Coverage
  • 82.35%
    14 out of 17 items documented1 out of 5 items with examples
  • Size
  • Source code size: 51.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.19 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • wpcarro/galapagos
    15 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • wpcarro

Galapagos

Crates.io Docs.rs License: Unlicensed

Simple evolutionary solver written in Rust.

Usage

use matrix_rs::galapagos::{self, Goal};

fn main() {
    let solution = galapagos::solve(
        |xs| {
            // Rosenbrock: (a - x)^2 + b(y - x^2)^2
            let x = xs[0];
            let y = xs[1];
            (1.0 - x).powi(2) + 100.0 * (y - x.powi(2)).powi(2)
        },
        &[(-5.0, 5.0), (-5.0, 5.0)],
        Goal::Minimize,
        Default::default(),
    );
    println!("{solution:?}");
}