pub struct RosenbrockProblem;
Expand description
Sample problem representing Rosenbrock function.
Trait Implementations§
Source§impl Problem for RosenbrockProblem
impl Problem for RosenbrockProblem
Source§fn compute<T: Individual>(&self, ind: &mut T) -> f32
fn compute<T: Individual>(&self, ind: &mut T) -> f32
Computes fitness value for a given individual. Read more
Source§fn is_solution(&self, value: f32) -> bool
fn is_solution(&self, value: f32) -> bool
Returns whether given fitness value is enough to be a solution. Read more
Source§fn get_random_individual<T: Individual, R: Rng>(
&self,
size: usize,
rng: &mut R,
) -> T
fn get_random_individual<T: Individual, R: Rng>( &self, size: usize, rng: &mut R, ) -> T
Generate random individual for the problem. Default implementation creates a real-coded
individual with the number of genes equal to
size
Read moreAuto Trait Implementations§
impl Freeze for RosenbrockProblem
impl RefUnwindSafe for RosenbrockProblem
impl Send for RosenbrockProblem
impl Sync for RosenbrockProblem
impl Unpin for RosenbrockProblem
impl UnwindSafe for RosenbrockProblem
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