pub struct SA<'a, 'b, F, R, FN, const N: usize> where
F: Float + SampleUniform + Debug,
StandardNormal: Distribution<F>,
R: Rng,
FN: FnMut(&Point<F, N>) -> F, {
pub f: FN,
pub p_0: &'a Point<F, N>,
pub t_0: F,
pub t_min: F,
pub bounds: &'a Bounds<F, N>,
pub apf: &'a APF<F, R>,
pub neighbour: &'a NeighbourMethod<F, R, N>,
pub schedule: &'a Schedule<F>,
pub status: &'a mut Status<'b, F, N>,
pub rng: &'a mut R,
}Expand description
Simulated annealing
Fields
f: FNObjective function
p_0: &'a Point<F, N>Initial point
t_0: FInitial temperature
t_min: FMinimum temperature
bounds: &'a Bounds<F, N>Bounds of the parameter space
apf: &'a APF<F, R>Acceptance probability function
neighbour: &'a NeighbourMethod<F, R, N>Method of getting a random neighbour
schedule: &'a Schedule<F>Annealing schedule
status: &'a mut Status<'b, F, N>Status function
rng: &'a mut RRandom number generator
Implementations
sourceimpl<F, R, FN, const N: usize> SA<'_, '_, F, R, FN, N> where
F: Float + SampleUniform + Debug,
StandardNormal: Distribution<F>,
R: Rng + SeedableRng,
FN: FnMut(&Point<F, N>) -> F,
impl<F, R, FN, const N: usize> SA<'_, '_, F, R, FN, N> where
F: Float + SampleUniform + Debug,
StandardNormal: Distribution<F>,
R: Rng + SeedableRng,
FN: FnMut(&Point<F, N>) -> F,
Auto Trait Implementations
impl<'a, 'b, F, R, FN, const N: usize> !RefUnwindSafe for SA<'a, 'b, F, R, FN, N>
impl<'a, 'b, F, R, FN, const N: usize> !Send for SA<'a, 'b, F, R, FN, N>
impl<'a, 'b, F, R, FN, const N: usize> !Sync for SA<'a, 'b, F, R, FN, N>
impl<'a, 'b, F, R, FN, const N: usize> Unpin for SA<'a, 'b, F, R, FN, N> where
F: Unpin,
FN: Unpin,
'b: 'a,
impl<'a, 'b, F, R, FN, const N: usize> !UnwindSafe for SA<'a, 'b, F, R, FN, N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more