Crate metaheuristics_nature[][src]

Expand description

A collection of nature-inspired metaheuristic algorithms.

use metaheuristics_nature::{Report, RGA, RGASetting, Setting, Solver, Task, ObjFunc};
let mut a = RGA::new(
    MyFunc::new(),
    RGASetting::default().task(Task::MinFit(1e-20)),
);
let ans = a.run(|| {});  // Run without callback, and get the final result
let (x, y): (Array1<f64>, f64) = a.result();  // Get the optimized XY value of your function
let reports: Vec<Report> = a.history();  // Get the history reports

Macros

Generate random boolean by positive factor.

Generate random values between [0., 1.) or by range.

Define a data structure and its builder functions.

Structs

The base class of algorithms. Please see Algorithm for more information.

Differential Evolution type.

Differential Evolution settings.

Firefly Algorithm type.

Firefly Algorithm settings.

Particle Swarm Optimization type.

Particle Swarm Optimization settings.

Real-coded Genetic Algorithm type.

Real-coded Genetic Algorithm settings.

The data of generation sampling.

Base settings.

Teaching Learning Based Optimization type.

Enums

The Differential Evolution strategy. Each strategy has different formula on recombination.

The terminal condition of the algorithm setting.

Traits

The methods of the metaheuristic algorithms.

The base of the objective function.

The public API for Algorithm.

Type Definitions

Teaching Learning Based Optimization settings. This is a type alias to Setting.