Function bevy_internal::utils::petgraph::algo::greedy_matching
source · pub fn greedy_matching<G>(graph: G) -> Matching<G>where
G: Visitable + IntoNodeIdentifiers + NodeIndexable + IntoNeighbors,
<G as GraphBase>::NodeId: Eq + Hash,
<G as GraphBase>::EdgeId: Eq + Hash,
Expand description
[Generic] Compute a matching using a greedy heuristic.
The input graph is treated as if undirected. The underlying heuristic is unspecified, but is guaranteed to be bounded by O(|V| + |E|). No guarantees about the output are given other than that it is a valid matching.
If you require a maximum matching, use maximum_matching
function
instead.