orbweaver 0.18.2

Crate designed for effortless construction and analysis of graph data structures.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::utils::sym::Sym;

use super::{LazySet, NodeMap};

/// Gets the equivalent values in `rel2` to a set in
/// `rel1`.
#[inline]
pub(crate) fn get_values_on_rel_map(ids: &[Sym], map: &NodeMap, out: &mut Vec<Sym>) {
    ids.iter().for_each(|&id| {
        if let LazySet::Initialized(values) = map.get(id) {
            out.extend(values.iter().copied());
        }
    })
}