Struct radiate_rust::engines::genetic_engine::GeneticEngine
source · pub struct GeneticEngine<G, A, T>where
G: Gene<G, A>,{
pub params: GeneticEngineParams<G, A, T>,
}Fields§
§params: GeneticEngineParams<G, A, T>Implementations§
source§impl<G, A, T> GeneticEngine<G, A, T>where
G: Gene<G, A>,
impl<G, A, T> GeneticEngine<G, A, T>where
G: Gene<G, A>,
pub fn new(params: GeneticEngineParams<G, A, T>) -> Self
pub fn from_codex(codex: Codex<G, A, T>) -> GeneticEngineParams<G, A, T>
pub fn evaluate(&self, handle: &mut EngineContext<G, A, T>)
pub fn select_survivors( &self, population: &Population<G, A>, ) -> Population<G, A>
pub fn select_offspring( &self, population: &Population<G, A>, ) -> Population<G, A>
pub fn alter(&self, population: &mut Population<G, A>, generation: i32)
pub fn filter(&self, population: &mut Population<G, A>, generation: i32)
pub fn recombine( &self, handle: &mut EngineContext<G, A, T>, survivors: Population<G, A>, offspring: Population<G, A>, )
pub fn audit(&self, output: &mut EngineContext<G, A, T>)
pub fn survivor_selector(&self) -> &impl Select<G, A>
pub fn offspring_selector(&self) -> &impl Select<G, A>
pub fn alterer(&self) -> &impl Alter<G, A>
pub fn codex(&self) -> &Codex<G, A, T>
pub fn fitness_fn(&self) -> &impl Fn(&T) -> Score
pub fn population(&self) -> &Population<G, A>
pub fn optimize(&self) -> &Optimize
pub fn survivor_count(&self) -> usize
pub fn offspring_count(&self) -> usize
Trait Implementations§
source§impl<G: Gene<G, A>, A, T: Clone> Engine<G, A, T> for GeneticEngine<G, A, T>
impl<G: Gene<G, A>, A, T: Clone> Engine<G, A, T> for GeneticEngine<G, A, T>
fn fit<F: Fn(&EngineContext<G, A, T>) -> bool>( &self, limit: F, ) -> EngineContext<G, A, T>
fn start(&self) -> EngineContext<G, A, T>
fn stop(&self, output: &mut EngineContext<G, A, T>) -> EngineContext<G, A, T>
Auto Trait Implementations§
impl<G, A, T> Freeze for GeneticEngine<G, A, T>
impl<G, A, T> !RefUnwindSafe for GeneticEngine<G, A, T>
impl<G, A, T> !Send for GeneticEngine<G, A, T>
impl<G, A, T> !Sync for GeneticEngine<G, A, T>
impl<G, A, T> Unpin for GeneticEngine<G, A, T>
impl<G, A, T> !UnwindSafe for GeneticEngine<G, A, T>
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