We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TransitiveRelation
1 parent 479cc7a commit 4b16ae1Copy full SHA for 4b16ae1
src/librustc_data_structures/transitive_relation.rs
@@ -373,6 +373,14 @@ impl<T: Clone + Debug + Eq + Hash> TransitiveRelation<T> {
373
}
374
matrix
375
376
+
377
+ /// Lists all the base edges in the graph: the initial _non-transitive_ set of element
378
+ /// relations, which will be later used as the basis for the transitive closure computation.
379
+ pub fn base_edges(&self) -> impl Iterator<Item=(&T, &T)> {
380
+ self.edges
381
+ .iter()
382
+ .map(move |edge| (&self.elements[edge.source.0], &self.elements[edge.target.0]))
383
+ }
384
385
386
/// Pare down is used as a step in the LUB computation. It edits the
0 commit comments