pub struct ArtificialBeeColony<B: Backend> { /* private fields */ }Expand description
Artificial Bee Colony strategy.
§Panics
Strategy::init panics if params.pop_size < 2, since the
employed-phase neighbour k ≠ i cannot be drawn from a colony of
one.
§Example
use burn::backend::Flex;
use rlevo_evolution::algorithms::metaheuristic::abc::{AbcConfig, ArtificialBeeColony};
let strategy = ArtificialBeeColony::<Flex>::new();
let params = AbcConfig::default_for(30, 10);
let _ = (strategy, params);Implementations§
Trait Implementations§
Source§impl<B: Clone + Backend> Clone for ArtificialBeeColony<B>
impl<B: Clone + Backend> Clone for ArtificialBeeColony<B>
Source§fn clone(&self) -> ArtificialBeeColony<B>
fn clone(&self) -> ArtificialBeeColony<B>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<B: Copy + Backend> Copy for ArtificialBeeColony<B>
Source§impl<B: Default + Backend> Default for ArtificialBeeColony<B>
impl<B: Default + Backend> Default for ArtificialBeeColony<B>
Source§fn default() -> ArtificialBeeColony<B>
fn default() -> ArtificialBeeColony<B>
Returns the “default value” for a type. Read more
Source§impl<B: Backend> Strategy<B> for ArtificialBeeColony<B>
impl<B: Backend> Strategy<B> for ArtificialBeeColony<B>
Source§fn init(
&self,
params: &AbcConfig,
rng: &mut dyn Rng,
device: &<B as BackendTypes>::Device,
) -> AbcState<B>
fn init( &self, params: &AbcConfig, rng: &mut dyn Rng, device: &<B as BackendTypes>::Device, ) -> AbcState<B>
Build the initial state. Read more
Source§fn ask(
&self,
params: &AbcConfig,
state: &AbcState<B>,
rng: &mut dyn Rng,
device: &<B as BackendTypes>::Device,
) -> (Tensor<B, 2>, AbcState<B>)
fn ask( &self, params: &AbcConfig, state: &AbcState<B>, rng: &mut dyn Rng, device: &<B as BackendTypes>::Device, ) -> (Tensor<B, 2>, AbcState<B>)
Propose the next population. Read more
Auto Trait Implementations§
impl<B> Freeze for ArtificialBeeColony<B>
impl<B> RefUnwindSafe for ArtificialBeeColony<B>
impl<B> Send for ArtificialBeeColony<B>
impl<B> Sync for ArtificialBeeColony<B>
impl<B> Unpin for ArtificialBeeColony<B>
impl<B> UnsafeUnpin for ArtificialBeeColony<B>
impl<B> UnwindSafe for ArtificialBeeColony<B>
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