ganesh 0.28.0

Minimization and sampling in Rust, simplified
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! The minimal Nelder–Mead example shown in the README.

use ganesh::{
    algorithms::gradient_free::NelderMead, test_functions::Rosenbrock, traits::Algorithm,
};
use std::convert::Infallible;

fn main() -> Result<(), Infallible> {
    let problem = Rosenbrock { n: 2 };
    let mut nm: NelderMead = Default::default();
    let result = nm.process_default(&problem, &(), [2.0, 2.0])?;
    println!("{result}");
    Ok(())
}