pub struct ValuatedMatroid {
pub matroid: Matroid,
pub valuation: BTreeMap<BTreeSet<usize>, f64>,
}Expand description
A matroid with a valuation on its bases (tropical Plücker vector).
The valuation v: bases → R satisfies the tropical Plücker relations.
Fields§
§matroid: MatroidUnderlying matroid
valuation: BTreeMap<BTreeSet<usize>, f64>Valuation: basis → value
Implementations§
Source§impl ValuatedMatroid
impl ValuatedMatroid
Sourcepub fn from_tropical_plucker(
k: usize,
n: usize,
coords: &[f64],
) -> Result<Self, String>
pub fn from_tropical_plucker( k: usize, n: usize, coords: &[f64], ) -> Result<Self, String>
Create a valuated matroid from tropical Plücker coordinates.
§Contract
requires: coords.len() == C(n, k)
ensures: result satisfies tropical Plücker relations (approximately)Sourcepub fn satisfies_tropical_plucker(&self) -> bool
pub fn satisfies_tropical_plucker(&self) -> bool
Check if the valuation satisfies tropical Plücker relations.
The 3-term tropical Plücker relation states: for any (k-1)-subset S and elements a < b < c < d not in S, the minimum of {v(S∪{a,c}) + v(S∪{b,d}), v(S∪{a,d}) + v(S∪{b,c})} is attained at least twice (where v(S∪{a,b}) + v(S∪{c,d}) is included).
Trait Implementations§
Source§impl Clone for ValuatedMatroid
impl Clone for ValuatedMatroid
Source§fn clone(&self) -> ValuatedMatroid
fn clone(&self) -> ValuatedMatroid
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 ValuatedMatroid
impl RefUnwindSafe for ValuatedMatroid
impl Send for ValuatedMatroid
impl Sync for ValuatedMatroid
impl Unpin for ValuatedMatroid
impl UnsafeUnpin for ValuatedMatroid
impl UnwindSafe for ValuatedMatroid
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