move correct_mutual_recursive_type_alias over

This commit is contained in:
Folkert 2022-04-24 17:21:52 +02:00
parent 0569d23385
commit 62a80db379
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 29 additions and 23 deletions

View file

@ -181,6 +181,25 @@ impl ReferenceMatrix {
break result;
}
}
/// Get the strongly-connected components of the set of input nodes.
pub fn strongly_connected_components_prim(&self, nodes: &[u32]) -> Sccs {
let mut params = Params::new(self.length, nodes);
'outer: loop {
for (node, value) in params.preorders.iter().enumerate() {
if let Preorder::Removed = value {
continue;
}
recurse_onto(self.length, &self.bitvec, node, &mut params);
continue 'outer;
}
break params.scc;
}
}
}
pub(crate) enum TopologicalSort {