[][src]Struct optlib::particleswarm::velocitycalc::InertiaVelocityCalculator

pub struct InertiaVelocityCalculator<'a, T> { /* fields omitted */ }

InertiaVelocityCalculator implements the equation with itertia coefficient w(t) v_i = w(t) * v_i + phi_personal * r_p * (p_i - x_i) + phi_global * r_g * (g_i - x_i) v_i - velocity projection for dimension i, p_i - personal best coordinate, g_i - global best coordinate, x_i - current coordinate, phi_personal, phi_global - parameters, r_p, r_g - random values in (0, 1), w(t) calculate with the Inertia trait, t - iteration number,

Methods

impl<'a, T> InertiaVelocityCalculator<'a, T>[src]

pub fn new(
    phi_personal: T,
    phi_global: T,
    inertia: Box<dyn Inertia<T> + 'a>
) -> Self
[src]

Trait Implementations

impl<'a, T: NumCast + Num + Copy> VelocityCalculator<T> for InertiaVelocityCalculator<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for InertiaVelocityCalculator<'a, T>

impl<'a, T> !Send for InertiaVelocityCalculator<'a, T>

impl<'a, T> !Sync for InertiaVelocityCalculator<'a, T>

impl<'a, T> Unpin for InertiaVelocityCalculator<'a, T> where
    T: Unpin

impl<'a, T> !UnwindSafe for InertiaVelocityCalculator<'a, T>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.