pub fn topological_ordering(root: Id, egraph: &EGraph) -> Vec<Id> {
    let mut vec = Vec::new();
    topological_ordering_rec(root, egraph, &mut vec);
    // let alt = (0..=usize::from(root)).collect::<Vec<usize>>().into_iter().map(|x| Id::from(x)).collect::<Vec<Id>>();
    // assert_eq!(vec, alt);
    vec
}
/// does a child first traversal of the egraph and returns a Vec<Id> in that
/// order. Notably an Id will never show up twice (if it showed up earlier
/// it wont show up again). Assumes no cycles in the EGraph.
/// Note that I'm pretty usre this will just return 0,1,2,3,... since due to structural
/// hashing that is a topological ordering
does a child first traversal of the egraph and returns a Vec in that
order. Notably an Id will never show up twice (if it showed up earlier
it wont show up again). Assumes no cycles in the EGraph.
Note that I'm pretty usre this will just return 0,1,2,3,... since due to structural
hashing that is a topological ordering
does a child first traversal of the egraph and returns a Vec in that order . Notably an Id will never show up twice ( if it showed up earlier it wont show up again ) . Assumes no cycles in the EGraph . Note that I ' m pretty usre this will just return 0 1 2 3 ... since due to structural hashing that is a topological ordering
pub fn topological_ordering(root: Id, egraph: &EGraph) -> Vec<Id> {
    let mut vec = Vec::new();
    topological_ordering_rec(root, egraph, &mut vec);
    // let alt = (0..=usize::from(root)).collect::<Vec<usize>>().into_iter().map(|x| Id::from(x)).collect::<Vec<Id>>();
    // assert_eq!(vec, alt);
    vec
}
pub fn topological_ordering ( root : Id , egraph : & EGraph ) -> Vec < Id > { let mut vec = Vec :: new ( ) ; topological_ordering_rec ( root , egraph , & mut vec ) ; // let alt = (0..=usize::from(root)).collect::<Vec<usize>>().into_iter().map(|x| Id::from(x)).collect::<Vec<Id>>(); // assert_eq!(vec, alt); vec }
does a child first traversal of the egraph and returns a Vec<Id> in that
order.
does a child first traversal of the egraph and returns a Vec<Id > in that order .
root
Id
egraph
&EGraph
root
Id
egraph
&EGraph