pub trait DirectedGraph<K: Hash + Eq + Sized, T> {
    type Node: DirectedGraphNode<K, T>;

    fn get(&self, key: &K) -> Option<&Self::Node>;
    fn get_mut(&mut self, key: &K) -> Option<&mut Self::Node>;
    fn node_count(&self) -> usize;
    fn from_len(&self) -> usize;
    fn to_len(&self) -> usize;
    fn from(&self) -> &[K]Notable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8];
    fn to(&self) -> &[K]Notable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8];
    fn topological_sort(&self) -> &[K]Notable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8];
}
Expand description

有向无环图 K 节点的键 T 节点的值

Required Associated Types

节点

Required Methods

根据 key 取 节点

根据 key 取 节点

取节点的数量

取 有输入节点 的 数量

取 有输出节点 的 数量

取 输入节点 切片

取 输出节点 切片

拓扑排序

Implementors