pub fn subsets(&self, polytope: &Abstract) -> Vec<Self> {
        let mut subsets = Vec::new();

        for flag_changes in self.flag_changes.subsets() {
            let mut flags = HashSet::new();

            for flag in &self.flags {
                if flags.insert(flag.clone()) {
                    let subset = Self::with_flags(polytope, flag_changes.clone(), flag.clone());

                    for new_flag in &subset.flags {
                        flags.insert(new_flag.clone());
                    }

                    subsets.push(subset);
                }
            }
        }

        subsets
    }
/// Returns the set of all flag sets obtained from this one after removing
/// exactly one element.
///
/// # Panics
/// You must call [`Polytope::element_sort`] before calling this method.
// TODO: make into an iterator instead.
Returns the set of all flag sets obtained from this one after removing
exactly one element.
Returns the set of all flag sets obtained from this one after removing exactly one element .
pub fn subsets(&self, polytope: &Abstract) -> Vec<Self> {
        let mut subsets = Vec::new();
        for flag_changes in self.flag_changes.subsets() {
            let mut flags = HashSet::new();
            for flag in &self.flags {
                if flags.insert(flag.clone()) {
                    let subset = Self::with_flags(polytope, flag_changes.clone(), flag.clone());
                    for new_flag in &subset.flags {
                        flags.insert(new_flag.clone());
                    }
                    subsets.push(subset);
                }
            }
        }
        subsets
    }
pub fn subsets ( & self , polytope : & Abstract ) -> Vec < Self > { let mut subsets = Vec :: new ( ) ; for flag_changes in self . flag_changes . subsets ( ) { let mut flags = HashSet :: new ( ) ; for flag in & self . flags { if flags . insert ( flag . clone ( ) ) { let subset = Self :: with_flags ( polytope , flag_changes . clone ( ) , flag . clone ( ) ) ; for new_flag in & subset . flags { flags . insert ( new_flag . clone ( ) ) ; } subsets . push ( subset ) ; } } } subsets }
Returns the set of all flag sets obtained from this one after removing
exactly one element.
Returns the set of all flag sets obtained from this one after removing exactly one element .
&self
polytope
&Abstract
&self
polytope
&Abstract
panics
You must call [`Polytope::element_sort`] before calling this method.
TODO: make into an iterator instead.
You must call [ ` Polytope :: element_sort ` ] before calling this method . TODO : make into an iterator instead .