Struct blossom::matching::Matching
[−]
[src]
pub struct Matching { /* fields omitted */ }
Represents a matching in a graph.
Methods
impl Matching
[src]
fn new(edges: &[Edge]) -> Matching
Create a new matching from given edges
fn is_empty(&self) -> bool
Returns a value indicating whether the matching is empty.
fn len(&self) -> usize
Returns the number of edges in the graph.
fn edges(&self) -> Vec<Edge>
Exports all edges in a vector.
fn vertices(&self) -> Vec<Vertex>
Exports all edges in a vector.
fn partner(&self, vertex: Vertex) -> Vertex
Gets the vertex that vertex
is connected to.
Panics if matching does not contain a vertex vertex
.
fn contract(&self, leafs: &[Vertex]) -> Matching
Creates a contracted matching with edges between leafs
removed.
fn augment(&self, path: &[Vertex]) -> Matching
Creates a expanded matching using the augmenting path
.
Trait Implementations
impl Clone for Matching
[src]
fn clone(&self) -> Matching
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more