pub enum Schedule<F: Float> {
    Logarithmic,
    Exponential {
        gamma: F,
    },
    Fast,
    Custom {
        f: fn(k: usize, t: F, t_0: F) -> F,
    },
}
Expand description

Annealing schedule

Variants

Logarithmic

Logarithmic:

$ t^{(k)} = t^{(1)} \ln(2) / \ln(k + 1) $

Exponential

Fields

gamma: F

Exponential parameter $ \gamma $

Exponential:

$ t^{(k+1)} = \gamma t^{(k)} \; \text{for} \; \gamma \in (0, 1) $

Fast

Fast:

$ t^{(k)} = t^{(1)} / k $

Custom

Fields

f: fn(k: usize, t: F, t_0: F) -> F

Custom function

Custom: choose your own!

Implementations

Lower the temperature

Arguments:

  • k — Index of the iteration;
  • t — Temperature,
  • t_0 — Initial temperature.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.