[−][src]Struct optlib::particleswarm::velocitycalc::ClassicVelocityCalculator
ClassicVelocityCalculator implements the equation from the article
Kennedy, J.; Eberhart, R. (1995). "Particle Swarm Optimization".
Proceedings of IEEE International Conference on Neural Networks IV, pp.1942-1948.
v_i = 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)
Methods
impl<T> ClassicVelocityCalculator<T>
[src]
Trait Implementations
impl<T: NumCast + Num + Copy> VelocityCalculator<T> for ClassicVelocityCalculator<T>
[src]
fn calc_new_velocity(
&mut self,
swarm: &Swarm<T>,
particle: &Particle<T>
) -> Vec<T>
[src]
&mut self,
swarm: &Swarm<T>,
particle: &Particle<T>
) -> Vec<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ClassicVelocityCalculator<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> !Send for ClassicVelocityCalculator<T>
impl<T> !Sync for ClassicVelocityCalculator<T>
impl<T> Unpin for ClassicVelocityCalculator<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for ClassicVelocityCalculator<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,