Function pso_rs::run [−][src]
pub fn run(
config: Config,
obj_f: fn(_: &Particle, _: usize, _: &Vec<usize>) -> f64,
terminate_f: Option<fn(_: f64) -> bool>
) -> Result<PSO, Box<dyn Error>>
Expand description
Creates a model and runs the PSO method
Panics
Panics if any particle coefficient becomes NaN (usually because of bad parameterization, e.g. c1 + c2 < 4)