AdjacencyList

Members

Aliases

AddEdgeResult
alias AddEdgeResult = Tuple!(EdgeDescriptor, "edge", bool, "addedNew")

A tuple with some names to help unpacking the result of an addEdge call.

Functions

addEdge
AddEdgeResult addEdge(VertexDescriptor src, VertexDescriptor dst, EdgeProperty value = EdgeProperty.init)

Adds an edge to the graph.

addVertex
VertexDescriptor addVertex(VertexProperty value = VertexProperty.init)

Adds a new vertex to the graph.

outEdges
auto outEdges(VertexDescriptor vertex)

Lists the outbound edges of a given vertex.

removeEdge
void removeEdge(EdgeDescriptor edge)

Removes an edge from the graph.

removeVertex
void removeVertex(VertexDescriptor vertex)

Removes a vertex from the graph. The complexity of this operaton varies with the storage class. For storage classes that have stable indexes, this is O(1). For classes with unstable indexes this is at least O(n), where n is the number of edges in the graph, due to the VertexDescriptors in all the edges having to be fixed up.

source
VertexDescriptor source(EdgeDescriptor edge)

Fetches the descriptor of the source vertex of the given edge.

target
VertexDescriptor target(EdgeDescriptor edge)

Fetches the descriptor of the target vertex of the supplied edge.

Properties

edgeCount
size_t edgeCount [@property getter]

Fetches the total number of edges in the graph. For debugging purposes only.

vertices
auto vertices [@property getter]

Returns a forward range that yields the descriptors for each vertex in the graph. The order of the vertices is undefined.

Structs

EdgeDescriptor
struct EdgeDescriptor

A handle that can be used by callers to identify a given edge.

Variables

_edges
EdgeList _edges;

The main edge store

_vertices
VertexStorage.Store!Vertex _vertices;

The main vertex store.

Meta