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

Fields

sd: F

Standard deviation

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

Fields

f: fn(p: &Point<F, N>, bounds: &Bounds<F, N>, rng: &mut R) -> Point<F, N>

Custom function

Custom: choose your own!

Implementations

Get a neighbour of the current point

Arguments:

  • p — Current point;
  • bounds — Bounds of the parameter space;
  • distribution — Distribution to sample from;
  • rng — Random number generator.

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.