Struct argmin::sa::SimulatedAnnealing [] [src]

pub struct SimulatedAnnealing<'a, T, U, V = U> where
    T: ArgminParameter + 'a,
    U: ArgminCostValue + 'a,
    V: 'a, 
{ pub init_temp: f64, pub max_iters: u64, pub temp_func: SATempFunc, pub custom_temp_func: Option<&'a Fn(f64, u64) -> f64>, pub state: Option<SimulatedAnnealingState<'a, T, U, V>>, }

Simulated Annealing struct (duh)

Fields

Initial temperature

Maximum number of iterations

which temperature function?

Custom temperature function

Current state of solver

Methods

impl<'a, T, U, V> SimulatedAnnealing<'a, T, U, V> where
    T: ArgminParameter,
    U: ArgminCostValue,
    V: 'a, 
[src]

[src]

Constructor

Returns an SimulatedAnnealing struct where all entries of the struct are set according to the parameters provided, apart from temp_func and custom_temp_func which are set to default values (SATempFunc::TemperatureFast and None, respectively).

Parameters:

problem: problem definition init_tmep: Initial temperature max_iters: Maximum number of iterations

[src]

Change temperature function to one of the options in SATempFunc.

This will overwrite any custom temperature functions provided by custom_temp_func().

[src]

Provide a custom temperature function.

The function has to implement the function signature &Fn(init_temp: f64, iteration_number: u64) -> f64 and return the current temperature. This will overwrite any changes done by a call to temp_func().

Trait Implementations

impl<'a, T, U, V> ArgminSolver<'a> for SimulatedAnnealing<'a, T, U, V> where
    T: ArgminParameter + 'a,
    U: ArgminCostValue + 'a,
    V: 'a, 
[src]

Parameter vector

Cost value

Hessian

Initial parameter(s)

Type of Problem (TODO: Trait!)

[src]

Initialize with a given problem and a starting point

[src]

Compute next point

[src]

Stopping criterions

[src]

Run initialization and iterations at once