pub struct TropicalMatrix { /* private fields */ }Expand description
Tropical matrix (max-plus)
Implementations§
Source§impl TropicalMatrix
impl TropicalMatrix
Sourcepub fn mul(&self, other: &Self) -> Self
pub fn mul(&self, other: &Self) -> Self
Tropical matrix multiplication: C[i,k] = max_j(A[i,j] + B[j,k])
Sourcepub fn closure(&self) -> Self
pub fn closure(&self) -> Self
Tropical matrix closure: A* = I ⊕ A ⊕ A² ⊕ … ⊕ A^n Computes all shortest paths (min-plus version is Floyd-Warshall)
Sourcepub fn max_cycle_mean(&self) -> f64
pub fn max_cycle_mean(&self) -> f64
Find tropical eigenvalue (max cycle mean) Returns the maximum average weight of any cycle
Trait Implementations§
Source§impl Clone for TropicalMatrix
impl Clone for TropicalMatrix
Source§fn clone(&self) -> TropicalMatrix
fn clone(&self) -> TropicalMatrix
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 Freeze for TropicalMatrix
impl RefUnwindSafe for TropicalMatrix
impl Send for TropicalMatrix
impl Sync for TropicalMatrix
impl Unpin for TropicalMatrix
impl UnwindSafe for TropicalMatrix
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