Trait ComputeGraph

Source
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§