pub struct AbcConfig {
pub pop_size: usize,
pub genome_dim: usize,
pub bounds: Bounds,
pub limit: usize,
pub tournament_size: usize,
}Expand description
Static configuration for ArtificialBeeColony.
Fields§
§pop_size: usizeColony size. The algorithm draws 2 · pop_size candidates per
generation (employed + onlooker).
genome_dim: usizeGenome dimensionality.
bounds: BoundsSearch-space bounds.
limit: usizeScout trigger. A bee with trial > limit is reinitialized.
Karaboga’s canonical default is pop_size · genome_dim / 2.
tournament_size: usizeTournament size for onlooker selection. Canonical ABC uses
roulette (fitness-proportionate); tournament is a GPU-friendly
equivalent that reuses
crate::ops::selection::tournament_indices_host.
Implementations§
Source§impl AbcConfig
impl AbcConfig
Sourcepub fn default_for(pop_size: usize, genome_dim: usize) -> Self
pub fn default_for(pop_size: usize, genome_dim: usize) -> Self
Default configuration for a given population size and genome dimensionality.
The scout limit is set to (pop_size * genome_dim) / 2 following
Karaboga’s canonical recommendation. The tournament_size defaults
to 3 (three-way tournament for onlooker selection).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AbcConfig
impl RefUnwindSafe for AbcConfig
impl Send for AbcConfig
impl Sync for AbcConfig
impl Unpin for AbcConfig
impl UnsafeUnpin for AbcConfig
impl UnwindSafe for AbcConfig
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<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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