pub trait ComputeGraph {
    type Edge: GraphEntry;
    type Node: GraphEntry;

    // Required methods
    fn add_node(
        &mut self,
        node: <Self::Node as GraphEntry>::Weight
    ) -> <Self::Node as GraphEntry>::Idx;
    fn add_edge(
        &mut self,
        source: <Self::Node as GraphEntry>::Idx,
        target: <Self::Node as GraphEntry>::Idx,
        weight: <Self::Edge as GraphEntry>::Weight
    ) -> <Self::Edge as GraphEntry>::Idx;
    fn clear(&mut self);
}

Required Associated Types§

Required Methods§

source

fn add_node( &mut self, node: <Self::Node as GraphEntry>::Weight ) -> <Self::Node as GraphEntry>::Idx

source

fn add_edge( &mut self, source: <Self::Node as GraphEntry>::Idx, target: <Self::Node as GraphEntry>::Idx, weight: <Self::Edge as GraphEntry>::Weight ) -> <Self::Edge as GraphEntry>::Idx

source

fn clear(&mut self)

Implementors§