pub struct IncidenceMatrix {
pub place_names: Vec<String>,
pub transition_names: Vec<String>,
pub d: Vec<Vec<i64>>,
}Expand description
Incidence Matrix representation D = D^+ - D^-
Fields§
§place_names: Vec<String>§transition_names: Vec<String>§d: Vec<Vec<i64>>Matrix rows correspond to places, columns correspond to transitions: D[place][transition]
Implementations§
Source§impl IncidenceMatrix
impl IncidenceMatrix
Sourcepub fn p_invariants(&self) -> Vec<Vec<i64>>
pub fn p_invariants(&self) -> Vec<Vec<i64>>
Computes P-invariants x such that x^T * D = 0^T.
Sourcepub fn verify_invariant(&self, weights: &[i64]) -> bool
pub fn verify_invariant(&self, weights: &[i64]) -> bool
Verifies if a given weight vector x satisfies x^T * D = 0^T.
Trait Implementations§
Source§impl Clone for IncidenceMatrix
impl Clone for IncidenceMatrix
Source§impl Debug for IncidenceMatrix
impl Debug for IncidenceMatrix
Source§impl PartialEq for IncidenceMatrix
impl PartialEq for IncidenceMatrix
impl StructuralPartialEq for IncidenceMatrix
Auto Trait Implementations§
impl Forget for IncidenceMatrix
impl Freeze for IncidenceMatrix
impl RefUnwindSafe for IncidenceMatrix
impl Send for IncidenceMatrix
impl Sync for IncidenceMatrix
impl Unpin for IncidenceMatrix
impl UnsafeUnpin for IncidenceMatrix
impl UnwindSafe for IncidenceMatrix
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