pub struct CartesianGeneticProgramming<B: Backend> { /* private fields */ }Expand description
Classical Cartesian GP with (1 + λ) ES.
§Example
use burn::backend::NdArray;
use rlevo_evolution::algorithms::gp_cgp::{CartesianGeneticProgramming, CgpConfig};
let strategy = CartesianGeneticProgramming::<NdArray>::new();
let params = CgpConfig::default_for(1);
assert!(params.genome_len() > 0);
let _ = strategy;Implementations§
Trait Implementations§
Source§impl<B: Clone + Backend> Clone for CartesianGeneticProgramming<B>
impl<B: Clone + Backend> Clone for CartesianGeneticProgramming<B>
Source§fn clone(&self) -> CartesianGeneticProgramming<B>
fn clone(&self) -> CartesianGeneticProgramming<B>
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<B: Default + Backend> Default for CartesianGeneticProgramming<B>
impl<B: Default + Backend> Default for CartesianGeneticProgramming<B>
Source§fn default() -> CartesianGeneticProgramming<B>
fn default() -> CartesianGeneticProgramming<B>
Returns the “default value” for a type. Read more
Source§impl<B: Backend> Strategy<B> for CartesianGeneticProgramming<B>
impl<B: Backend> Strategy<B> for CartesianGeneticProgramming<B>
Source§fn init(
&self,
params: &CgpConfig,
rng: &mut dyn Rng,
device: &B::Device,
) -> CgpState<B>
fn init( &self, params: &CgpConfig, rng: &mut dyn Rng, device: &B::Device, ) -> CgpState<B>
Build the initial state. Read more
Source§fn ask(
&self,
params: &CgpConfig,
state: &CgpState<B>,
rng: &mut dyn Rng,
device: &B::Device,
) -> (Tensor<B, 2, Int>, CgpState<B>)
fn ask( &self, params: &CgpConfig, state: &CgpState<B>, rng: &mut dyn Rng, device: &B::Device, ) -> (Tensor<B, 2, Int>, CgpState<B>)
Propose the next population. Read more
impl<B: Copy + Backend> Copy for CartesianGeneticProgramming<B>
Auto Trait Implementations§
impl<B> Freeze for CartesianGeneticProgramming<B>
impl<B> RefUnwindSafe for CartesianGeneticProgramming<B>
impl<B> Send for CartesianGeneticProgramming<B>
impl<B> Sync for CartesianGeneticProgramming<B>
impl<B> Unpin for CartesianGeneticProgramming<B>
impl<B> UnsafeUnpin for CartesianGeneticProgramming<B>
impl<B> UnwindSafe for CartesianGeneticProgramming<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<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