use ReferenceMatrix for topological sort

This commit is contained in:
Folkert 2022-05-20 13:02:28 +02:00
parent 8c358332c8
commit c190bfa2fe
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
5 changed files with 24 additions and 15 deletions

View file

@ -10,7 +10,7 @@ mod vec_map;
mod vec_set;
pub use all::{default_hasher, BumpMap, ImEntry, ImMap, ImSet, MutMap, MutSet, SendMap};
pub use reference_matrix::{ReferenceMatrix, Sccs};
pub use reference_matrix::{ReferenceMatrix, Sccs, TopologicalSort};
pub use small_string_interner::SmallStringInterner;
pub use vec_map::VecMap;
pub use vec_set::VecSet;

View file

@ -154,7 +154,7 @@ impl ReferenceMatrix {
}
}
#[allow(dead_code)]
#[derive(Debug)]
pub enum TopologicalSort {
/// There were no cycles, all nodes have been partitioned into groups
Groups { groups: Vec<Vec<u32>> },