pub struct Matching<G: GraphBase> { /* private fields */ }Expand description
Computed matching of the graph.
Implementations
sourceimpl<G> Matching<G> where
    G: NodeIndexable, 
 
impl<G> Matching<G> where
    G: NodeIndexable, 
sourcepub fn mate(&self, node: G::NodeId) -> Option<G::NodeId>
 
pub fn mate(&self, node: G::NodeId) -> Option<G::NodeId>
Gets the matched counterpart of given node, if there is any.
Returns None if the node is not matched or does not exist.
sourcepub fn edges(&self) -> MatchedEdges<'_, G>ⓘNotable traits for MatchedEdges<'_, G>impl<G> Iterator for MatchedEdges<'_, G> where
    G: NodeIndexable,     type Item = (G::NodeId, G::NodeId);
 
pub fn edges(&self) -> MatchedEdges<'_, G>ⓘNotable traits for MatchedEdges<'_, G>impl<G> Iterator for MatchedEdges<'_, G> where
    G: NodeIndexable,     type Item = (G::NodeId, G::NodeId);
G: NodeIndexable, type Item = (G::NodeId, G::NodeId);
Iterates over all edges from the matching.
An edge is represented by its endpoints. The graph is considered undirected and every pair of matched nodes is reported only once.
sourcepub fn nodes(&self) -> MatchedNodes<'_, G>ⓘNotable traits for MatchedNodes<'_, G>impl<G> Iterator for MatchedNodes<'_, G> where
    G: NodeIndexable,     type Item = G::NodeId;
 
pub fn nodes(&self) -> MatchedNodes<'_, G>ⓘNotable traits for MatchedNodes<'_, G>impl<G> Iterator for MatchedNodes<'_, G> where
    G: NodeIndexable,     type Item = G::NodeId;
G: NodeIndexable, type Item = G::NodeId;
Iterates over all nodes from the matching.
sourcepub fn contains_edge(&self, a: G::NodeId, b: G::NodeId) -> bool
 
pub fn contains_edge(&self, a: G::NodeId, b: G::NodeId) -> bool
Returns true if given edge is in the matching, or false otherwise.
If any of the the nodes does not exist, false is returned.
sourcepub fn contains_node(&self, node: G::NodeId) -> bool
 
pub fn contains_node(&self, node: G::NodeId) -> bool
Returns true if given node is in the matching, or false otherwise.
If the node does not exist, false is returned.
Auto Trait Implementations
impl<G> RefUnwindSafe for Matching<G> where
    G: RefUnwindSafe,
    <G as GraphBase>::NodeId: RefUnwindSafe, 
impl<G> Send for Matching<G> where
    G: Send,
    <G as GraphBase>::NodeId: Send, 
impl<G> Sync for Matching<G> where
    G: Sync,
    <G as GraphBase>::NodeId: Sync, 
impl<G> Unpin for Matching<G> where
    G: Unpin,
    <G as GraphBase>::NodeId: Unpin, 
impl<G> UnwindSafe for Matching<G> where
    G: UnwindSafe,
    <G as GraphBase>::NodeId: UnwindSafe, 
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more