Trait GrowableGraph

Source
pub trait GrowableGraph {
    // Required methods
    fn new() -> Self;
    fn add_vertex(&mut self) -> VertexId;
    fn add_edge(&mut self, source: VertexId, sink: VertexId) -> EdgeId;
}
Expand description

A trait for low-level growable graphs.

Required Methods§

Source

fn new() -> Self

Generate a new and empty graph.

Source

fn add_vertex(&mut self) -> VertexId

Add a new vertex into the graph.

Source

fn add_edge(&mut self, source: VertexId, sink: VertexId) -> EdgeId

Add a new edge from source to sink for directed graphs or between them for undirected graphs.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl GrowableGraph for algograph::graph::directed::AdjacentListGraph

Source§

impl GrowableGraph for algograph::graph::directed::TreeBackedGraph

Source§

impl GrowableGraph for algograph::graph::undirected::AdjacentListGraph

Source§

impl GrowableGraph for algograph::graph::undirected::TreeBackedGraph