Skip to main content

swarm_minimum

Function swarm_minimum 

Source
pub fn swarm_minimum<F: FnMut(&[f64]) -> f64>(
    f: F,
    lower: &[f64],
    upper: &[f64],
    particles: usize,
    iterations: usize,
) -> OgeomResult<Minimum>
Expand description

A minimum of f over the box by particle swarm: particles points moving under their own best and the swarm’s best for iterations rounds, from a deterministic scattering, then polished locally. No certificate: the swarm reports the best it saw.

§Errors

OgeomError::Construction if the box is malformed or there are no particles.