pub struct MultiObjectiveOptimizer { /* private fields */ }Expand description
Multi-objective optimizer
Implementations§
Source§impl MultiObjectiveOptimizer
impl MultiObjectiveOptimizer
Sourcepub fn new(num_objectives: usize, minimize: Vec<bool>) -> Self
pub fn new(num_objectives: usize, minimize: Vec<bool>) -> Self
Create a new multi-objective optimizer
Sourcepub fn with_population_size(self, size: usize) -> Self
pub fn with_population_size(self, size: usize) -> Self
Set population size
Sourcepub fn with_max_generations(self, gens: usize) -> Self
pub fn with_max_generations(self, gens: usize) -> Self
Set maximum generations
Sourcepub fn non_dominated_sort(
&self,
population: &mut [MultiObjectiveSolution],
) -> Vec<Vec<usize>>
pub fn non_dominated_sort( &self, population: &mut [MultiObjectiveSolution], ) -> Vec<Vec<usize>>
Compute non-dominated sorting (NSGA-II style)
Sourcepub fn compute_crowding_distance(
&self,
population: &mut [MultiObjectiveSolution],
)
pub fn compute_crowding_distance( &self, population: &mut [MultiObjectiveSolution], )
Compute crowding distance for diversity preservation
Sourcepub fn get_pareto_frontier(
&self,
population: &[MultiObjectiveSolution],
) -> Vec<MultiObjectiveSolution>
pub fn get_pareto_frontier( &self, population: &[MultiObjectiveSolution], ) -> Vec<MultiObjectiveSolution>
Get Pareto frontier (non-dominated front)
Auto Trait Implementations§
impl Freeze for MultiObjectiveOptimizer
impl RefUnwindSafe for MultiObjectiveOptimizer
impl Send for MultiObjectiveOptimizer
impl Sync for MultiObjectiveOptimizer
impl Unpin for MultiObjectiveOptimizer
impl UnwindSafe for MultiObjectiveOptimizer
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> 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