Crate btree_network Copy item path Source error error module contains the definition of the Error struct.BTreeNetwork BTreeNetwork is an implementation of a network (abstract data structure)
which utilizes BTreeMap for the edge and vertex adjacency lists.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 network.