pub struct LapSolver<A> { /* private fields */ }Expand description
Reusable solver: keeps its buffers between calls, which matters for the many small LAPs of the k-assignment heuristics.
Implementations§
Source§impl<A: Acc> LapSolver<A>
impl<A: Acc> LapSolver<A>
pub fn new() -> Self
Sourcepub fn with_jv_init(self, on: bool) -> Self
pub fn with_jv_init(self, on: bool) -> Self
Enable or disable the Jonker-Volgenant initialisation (column reduction, reduction transfer, augmenting row reduction) used for square matrices without forbidden entries. Enabled by default. When disabled, or not applicable, every row is augmented by shortest path as in scipy, and ties are broken exactly like scipy.
Sourcepub fn solve<T>(
&mut self,
m: MatrixView<'_, T>,
sense: Sense,
) -> Result<LapSolution<A>, LapError>where
T: Cost<Acc = A>,
pub fn solve<T>(
&mut self,
m: MatrixView<'_, T>,
sense: Sense,
) -> Result<LapSolution<A>, LapError>where
T: Cost<Acc = A>,
Solve the LAP on m.
Trait Implementations§
Auto Trait Implementations§
impl<A> Forget for LapSolver<A>
impl<A> Freeze for LapSolver<A>
impl<A> Move for LapSolver<A>
impl<A> RefUnwindSafe for LapSolver<A>where
Vec<A>: RefUnwindSafe,
impl<A> Send for LapSolver<A>
impl<A> Sync for LapSolver<A>
impl<A> Unpin for LapSolver<A>
impl<A> UnsafeUnpin for LapSolver<A>where
Vec<A>: UnsafeUnpin,
impl<A> UnwindSafe for LapSolver<A>where
Vec<A>: 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