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

pub struct CanonicalVelocityCalculator<T> { /* fields omitted */ }

CanonicalVelocityCalculator implements the "canonical" equation: v_i = xi * (v_i + phi_p * r_p * (p_i - x_i) + phi_g * 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_p, phi_g - parameters, r_p, r_g - random values in (0, 1), xi = 2 * alpha / (phi - 2), phi = phi_p + phi_g alpha in (0, 1), phi must be greater than 4

Methods

impl<T: Float> CanonicalVelocityCalculator<T>[src]

pub fn new(phi_personal: T, phi_global: T, alpha: T) -> Self[src]

Trait Implementations

impl<T: NumCast + Num + Copy> VelocityCalculator<T> for CanonicalVelocityCalculator<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for CanonicalVelocityCalculator<T> where
    T: RefUnwindSafe

impl<T> !Send for CanonicalVelocityCalculator<T>

impl<T> !Sync for CanonicalVelocityCalculator<T>

impl<T> Unpin for CanonicalVelocityCalculator<T> where
    T: Unpin

impl<T> UnwindSafe for CanonicalVelocityCalculator<T> where
    T: UnwindSafe

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.