fn node_offspring_set(&self, obj: &Self::Id) -> HashSet<Self::Id> {
        let mut visit_set = HashSet::new();
        let mut final_set = HashSet::new();
        visit_set.insert(obj.clone());
        while !visit_set.is_empty() {
            let mut wait_set = HashSet::new();
            for obj in visit_set.iter() {
                let children =
                    self.node(&obj).map(|x| x.children()).unwrap_or_default();
                wait_set.extend(children);
            }
            final_set.extend(wait_set.iter().cloned());
            visit_set.clear();
            visit_set.extend(wait_set);
        }
        final_set
    }
/// returns all the offspring of a node, not including itself
returns all the offspring of a node, not including itself
returns all the offspring of a node not including itself
fn node_offspring_set(&self, obj: &Self::Id) -> HashSet<Self::Id> {
        let mut visit_set = HashSet::new();
        let mut final_set = HashSet::new();
        visit_set.insert(obj.clone());
        while !visit_set.is_empty() {
            let mut wait_set = HashSet::new();
            for obj in visit_set.iter() {
                let children =
                    self.node(&obj).map(|x| x.children()).unwrap_or_default();
                wait_set.extend(children);
            }
            final_set.extend(wait_set.iter().cloned());
            visit_set.clear();
            visit_set.extend(wait_set);
        }
        final_set
    }
fn node_offspring_set ( & self , obj : & Self :: Id ) -> HashSet < Self :: Id > { let mut visit_set = HashSet :: new ( ) ; let mut final_set = HashSet :: new ( ) ; visit_set . insert ( obj . clone ( ) ) ; while ! visit_set . is_empty ( ) { let mut wait_set = HashSet :: new ( ) ; for obj in visit_set . iter ( ) { let children = self . node ( & obj ) . map ( | x | x . children ( ) ) . unwrap_or_default ( ) ; wait_set . extend ( children ) ; } final_set . extend ( wait_set . iter ( ) . cloned ( ) ) ; visit_set . clear ( ) ; visit_set . extend ( wait_set ) ; } final_set }
returns all the offspring of a node, not including itself
returns all the offspring of a node not including itself
&self
obj
&Self::Id
&self
obj
&Self::Id