fn filter_irc(vec: &Vec<Vec<(usize,usize)>>) -> Vec<usize> {
    let mut out = Vec::new(); // The indices of the facetings that aren't compounds.

    'a: for a in 0..vec.len() { // `a` is the index of the base set
        for b in a+1..vec.len() { // `b` is the index of a potential subset of `a`
            if vec[b].len() > vec[a].len() { // A strict subset must be smaller than the base.
                continue
            }
            if vec[b][0] > vec[a][0] { // One of the subsets must contain the first facet.
                break
            }
            let mut i = 0;
            for f in &vec[a] { // Searches through `b` to see if all elements are in `a`.
                if &vec[b][i] > f {
                    continue
                }
                if &vec[b][i] < f {
                    break
                }
                i += 1;
                if i >= vec[b].len() { // We've found a subset.
                    continue 'a;
                }
            }
        }
        out.push(a)
    }
    out
}
/// For each faceting, checks if it is a compound of other facetings, and removes it if so.
For each faceting, checks if it is a compound of other facetings, and removes it if so.
For each faceting checks if it is a compound of other facetings and removes it if so .
fn filter_irc(vec: &Vec<Vec<(usize,usize)>>) -> Vec<usize> {
    let mut out = Vec::new(); // The indices of the facetings that aren't compounds.
    'a: for a in 0..vec.len() { // `a` is the index of the base set
        for b in a+1..vec.len() { // `b` is the index of a potential subset of `a`
            if vec[b].len() > vec[a].len() { // A strict subset must be smaller than the base.
                continue
            }
            if vec[b][0] > vec[a][0] { // One of the subsets must contain the first facet.
                break
            }
            let mut i = 0;
            for f in &vec[a] { // Searches through `b` to see if all elements are in `a`.
                if &vec[b][i] > f {
                    continue
                }
                if &vec[b][i] < f {
                    break
                }
                i += 1;
                if i >= vec[b].len() { // We've found a subset.
                    continue 'a;
                }
            }
        }
        out.push(a)
    }
    out
}
fn filter_irc ( vec : & Vec < Vec < ( usize , usize ) > > ) -> Vec < usize > { let mut out = Vec :: new ( ) ; // The indices of the facetings that aren't compounds. ' a : for a in 0 .. vec . len ( ) { // `a` is the index of the base set for b in a + 1 .. vec . len ( ) { // `b` is the index of a potential subset of `a` if vec [ b ] . len ( ) > vec [ a ] . len ( ) { // A strict subset must be smaller than the base. continue } if vec [ b ] [ 0 ] > vec [ a ] [ 0 ] { // One of the subsets must contain the first facet. break } let mut i = 0 ; for f in & vec [ a ] { // Searches through `b` to see if all elements are in `a`. if & vec [ b ] [ i ] > f { continue } if & vec [ b ] [ i ] < f { break } i += 1 ; if i >= vec [ b ] . len ( ) { // We've found a subset. continue ' a ; } } } out . push ( a ) } out }
For each faceting, checks if it is a compound of other facetings, and removes it if so.
For each faceting checks if it is a compound of other facetings and removes it if so .
vec
&Vec<Vec<(usize,usize)>>