pub struct Matching<G: GraphBase> { /* private fields */ }
Expand description

Computed matching of the graph.

Implementations

Gets the matched counterpart of given node, if there is any.

Returns None if the node is not matched or does not exist.

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.

Iterates over all nodes from the matching.

Returns true if given edge is in the matching, or false otherwise.

If any of the the nodes does not exist, false is returned.

Returns true if given node is in the matching, or false otherwise.

If the node does not exist, false is returned.

Gets the number of matched edges.

Returns true if the number of matched edges is 0.

Returns true if the matching is perfect.

A matching is perfect if every node in the graph is incident to an edge from the matching.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.