Struct lgl::graph::DirectedGraph [] [src]

pub struct DirectedGraph<'a, T: 'a + Eq + Hash> { /* fields omitted */ }

A directed graph. Each edge has a source and target vertex.

Warning

This implementation is not thread-safe

Methods

impl<'a, T: 'a + Eq + Hash> DirectedGraph<'a, T>
[src]

Constructs an empty directed graph.

Adds a vertex labeled with the input vertex.

Returns true i.f.f. this vertex was not previously in the graph.

Given two vertices, u and v, creates an edge u -> v.

These vertices do not need to be in the graph before calling this method for this work.

Returns true i.f.f. there is an edge u -> v.

Get the set of neighbors for a given vertex.