pub struct AssignmentSolution {
pub assign: Vec<i32>,
pub cost: f64,
pub stats: SolveStats,
}Expand description
Result of a successful AssignmentBuilder::solve call.
Fields§
§assign: Vec<i32>Length n_rows. Each entry is the assigned column index in
0..n_cols, or SENTINEL (-1) if the row was left
unmatched.
cost: f64Total cost of the assignment: the sum of cost_matrix[i][k]
for each matched row i → k, plus
AssignmentBuilder::unmatch_penalty for each unmatched row.
stats: SolveStatsStatistics from the underlying branch-and-bound run. Inspect
SolveStats::budget_exceeded to distinguish best-so-far
from optimal solutions.
Trait Implementations§
Source§impl Clone for AssignmentSolution
impl Clone for AssignmentSolution
Source§fn clone(&self) -> AssignmentSolution
fn clone(&self) -> AssignmentSolution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Freeze for AssignmentSolution
impl RefUnwindSafe for AssignmentSolution
impl Send for AssignmentSolution
impl Sync for AssignmentSolution
impl Unpin for AssignmentSolution
impl UnsafeUnpin for AssignmentSolution
impl UnwindSafe for AssignmentSolution
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