[][src]Crate btree_dag

Modules

error

error module contains the definition of the Error struct.

Structs

BTreeDag

BTreeDag is an implementation of a directed acyclic graph (abstract data structure) which utilizes BTreeMap for the vertex adjacency list.

Traits

AddEdge

AddEdge add an edge from the vertex x to the vertex y, if it is not there.

AddVertex

AddVertex adds the vertex x, if it is not there.

Adjacent

Adjacent tests whether there is an edge from the vertex x to the vertex y. An error is thrown if either x, or y do not exist. By definition of adjacent there must exist an edge e, with value (x, y) in order for vertices x, and y to be considered adjacent.

Connections

Connections lists all vertices y such that there is an edge from the vertex x to the vertex y. An error is thrown if x does not exist.

GetVertexValue

GetVertexValue returns the value associated with the vertex x.

RemoveEdge

RemoveEdge removes the edge from the vertex x to the vertex y, if it is there.

RemoveVertex

RemoveVertex removes the vertex x, if it is there.

Vertices

Vertices returns the set of the vertices which comprise the dag.