pub struct Individual<T: Float> {
pub variables: Vec<T>,
pub objectives: Vec<T>,
pub rank: usize,
pub crowding_distance: T,
pub constraint_violations: Vec<T>,
}Expand description
Individual solution in multi-objective optimization
Fields§
§variables: Vec<T>Decision variables
objectives: Vec<T>Objective function values
rank: usizeDomination rank (0 = non-dominated)
crowding_distance: TCrowding distance for diversity
constraint_violations: Vec<T>Constraint violations (if any)
Implementations§
Source§impl<T: Float> Individual<T>
impl<T: Float> Individual<T>
Sourcepub fn dominates(&self, other: &Individual<T>) -> bool
pub fn dominates(&self, other: &Individual<T>) -> bool
Check if this individual dominates another
Sourcepub fn is_feasible(&self) -> bool
pub fn is_feasible(&self) -> bool
Check if solutions are feasible (no constraint violations)
Trait Implementations§
Source§impl<T: Clone + Float> Clone for Individual<T>
impl<T: Clone + Float> Clone for Individual<T>
Source§fn clone(&self) -> Individual<T>
fn clone(&self) -> Individual<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for Individual<T>where
T: Freeze,
impl<T> RefUnwindSafe for Individual<T>where
T: RefUnwindSafe,
impl<T> Send for Individual<T>where
T: Send,
impl<T> Sync for Individual<T>where
T: Sync,
impl<T> Unpin for Individual<T>where
T: Unpin,
impl<T> UnwindSafe for Individual<T>where
T: UnwindSafe,
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