[][src]Enum argmin::solver::simulatedannealing::SATempFunc

pub enum SATempFunc {
    TemperatureFast,
    Boltzmann,
    Exponential(f64),
    Custom(Box<dyn Fn(f64, u64) -> f64>),
}

Temperature functions for Simulated Annealing.

Given the initial temperature t_init and the iteration number i, the current temperature t_i is given as follows:

  • SATempFunc::TemperatureFast: t_i = t_init / i
  • SATempFunc::Boltzmann: t_i = t_init / ln(i)
  • SATempFunc::Exponential: t_i = t_init * 0.95^i
  • SATempFunc::Custom: User provided temperature update function which must have the function signature &Fn(init_temp: f64, iteration_number: u64) -> f64

Variants

TemperatureFast

t_i = t_init / i

Boltzmann

t_i = t_init / ln(i)

Exponential(f64)

t_i = t_init * x^i

Custom(Box<dyn Fn(f64, u64) -> f64>)

User-provided temperature function. The first parameter must be the current temperature and the second parameter must be the iteration number.

Auto Trait Implementations

impl !Send for SATempFunc

impl !Sync for SATempFunc

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]