pub struct LShadeConfig {
pub np_init: usize,
pub np_final: usize,
pub p: f64,
pub arc_rate: f64,
pub memory_size: usize,
}Expand description
L-SHADE specific configuration
Fields§
§np_init: usizeInitial population size multiplier (default: 18) NP_init = np_init * n_dim
np_final: usizeFinal population size (default: 4)
p: f64p parameter for pbest selection (default: 0.11) Selects from top p*100% of population
arc_rate: f64Archive rate (default: 2.1) Archive size = arc_rate * NP_current
memory_size: usizeMemory size for parameter adaptation (default: 6)
Implementations§
Source§impl LShadeConfig
impl LShadeConfig
Sourcepub fn initial_population_size(&self, n_dim: usize) -> usize
pub fn initial_population_size(&self, n_dim: usize) -> usize
Compute initial population size
Sourcepub fn current_population_size(
&self,
n_dim: usize,
nfev: usize,
max_nfev: usize,
) -> usize
pub fn current_population_size( &self, n_dim: usize, nfev: usize, max_nfev: usize, ) -> usize
Compute current population size based on progress Uses linear reduction formula from L-SHADE paper
Sourcepub fn current_archive_size(&self, current_np: usize) -> usize
pub fn current_archive_size(&self, current_np: usize) -> usize
Compute current archive size
Sourcepub fn pbest_size(&self, current_np: usize) -> usize
pub fn pbest_size(&self, current_np: usize) -> usize
Compute pbest size for current population
Trait Implementations§
Source§impl Clone for LShadeConfig
impl Clone for LShadeConfig
Source§fn clone(&self) -> LShadeConfig
fn clone(&self) -> LShadeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LShadeConfig
impl Debug for LShadeConfig
Auto Trait Implementations§
impl Freeze for LShadeConfig
impl RefUnwindSafe for LShadeConfig
impl Send for LShadeConfig
impl Sync for LShadeConfig
impl Unpin for LShadeConfig
impl UnsafeUnpin for LShadeConfig
impl UnwindSafe for LShadeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more