pub struct TransportPlan {
pub plan: Vec<Vec<f64>>,
pub cost: f64,
pub iterations: usize,
pub marginal_error: f64,
pub converged: bool,
}Expand description
Result of Sinkhorn algorithm
Fields§
§plan: Vec<Vec<f64>>Transport plan matrix γ[i,j] (n × m)
cost: f64Total transport cost
iterations: usizeNumber of iterations to convergence
marginal_error: f64Final marginal error (||Pγ - a||₁ + ||γᵀ1 - b||₁)
converged: boolWhether the algorithm converged
Trait Implementations§
Source§impl Clone for TransportPlan
impl Clone for TransportPlan
Source§fn clone(&self) -> TransportPlan
fn clone(&self) -> TransportPlan
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 TransportPlan
impl RefUnwindSafe for TransportPlan
impl Send for TransportPlan
impl Sync for TransportPlan
impl Unpin for TransportPlan
impl UnwindSafe for TransportPlan
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