Enum annealing::NeighbourMethod
source · [−]pub enum NeighbourMethod<F, R, const N: usize> where
F: Float,
StandardNormal: Distribution<F>,
R: Rng, {
Normal {
sd: F,
},
Custom {
f: fn(p: &Point<F, N>, bounds: &Bounds<F, N>, rng: &mut R) -> Point<F, N>,
},
}
Expand description
Method of getting a random neighbour
Variants
Normal
Get a neighbour in the vicinity of the current point by sampling a random normal distribution with the mean in that point and with the provided standard deviation
Custom
Custom: choose your own!
Implementations
sourceimpl<F, R, const N: usize> Method<F, R, N> where
F: Float + Debug,
StandardNormal: Distribution<F>,
R: Rng,
impl<F, R, const N: usize> Method<F, R, N> where
F: Float + Debug,
StandardNormal: Distribution<F>,
R: Rng,
Auto Trait Implementations
impl<F, R, const N: usize> RefUnwindSafe for Method<F, R, N> where
F: RefUnwindSafe,
impl<F, R, const N: usize> Send for Method<F, R, N> where
F: Send,
impl<F, R, const N: usize> Sync for Method<F, R, N> where
F: Sync,
impl<F, R, const N: usize> Unpin for Method<F, R, N> where
F: Unpin,
impl<F, R, const N: usize> UnwindSafe for Method<F, R, N> where
F: UnwindSafe,
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