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

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

Velocity update with negative reinforcement, global and current best and worst positions. v_i = xi * (v_i + phi_best_personal * rb_p * (p_best_i - x_i) + phi_best_current * rb_c * (c_best_i - x_i) + phi_best_global * rb_g * (g_best_i - x_i) - phi_worst_personal * rw_p * (p_worst_i - x_i) - phi_worst_current * rw_c * (c_worst_i - x_i) - phi_worst_global * rw_g * (g_worst_i - x_i))

v_i - velocity projection for dimension i, p_best_i - personal best coordinate, c_best_i - best coordinate for current swarm, g_best_i - global best coordinate, p_worst_i - personal worst coordinate, c_worst_i - worst coordinate for current swarm, g_worst_i - global worst coordinate, xi - parameter, x_i - current coordinate, phi_best_personal, phi_best_current, phi_best_global, phi_worst_personal, phi_worst_current, phi_worst_global - parameters, rb_p, rb_c, rb_g, rw_p, rw_c, rw_g - random values in (0, 1),

Methods

impl<T> NegativeReinforcement<T>[src]

pub fn new(
    phi_best_personal: T,
    phi_best_current: T,
    phi_best_global: T,
    phi_worst_personal: T,
    phi_worst_current: T,
    phi_worst_global: T,
    xi: T
) -> Self
[src]

Trait Implementations

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

Auto Trait Implementations

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

impl<T> !Send for NegativeReinforcement<T>

impl<T> !Sync for NegativeReinforcement<T>

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

impl<T> UnwindSafe for NegativeReinforcement<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.