pub trait Contain<T>
where
T: PartialEq,
{
fn contains(&self, elem: &T) -> bool;
fn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool {
iter.into_iter().all(|i| self.contains(&i))
}
fn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool {
iter.into_iter().any(|i| self.contains(&i))
}
}
pub trait Node: Clone + Default + Eq + std::hash::Hash {}
impl<T> Node for T where T: Clone + Default + Eq + std::hash::Hash {}
pub trait Weight: Clone + PartialEq {}
impl<T> Weight for T where T: Clone + PartialEq {}