IndexedEdgeList

Graph data type based on igraph's igraph_t. The basic data structure is a pair of arrays whose entries consist of respectively the source (tail) and destination (head) vertices of the edges in the graph. These are extended by sorted indices and cumulative sums that enable fast calculation of graph properties from the stored data.

Members

Aliases

degreeIn
alias degreeIn = degree
Undocumented in source.
degreeOut
alias degreeOut = degree
Undocumented in source.
directed
alias directed = dir

Static boolean value indicating whether or not the graph is directed. This is available for compile-time as well as runtime checks.

incidentEdgesIn
alias incidentEdgesIn = incidentEdges
Undocumented in source.
incidentEdgesOut
alias incidentEdgesOut = incidentEdges
Undocumented in source.
neighbors
alias neighbors = neighbours
Undocumented in source.
neighborsIn
alias neighborsIn = neighboursIn
Undocumented in source.
neighborsOut
alias neighborsOut = neighboursOut
Undocumented in source.
neighboursIn
alias neighboursIn = neighbours
Undocumented in source.
neighboursOut
alias neighboursOut = neighbours
Undocumented in source.

Functions

addEdge
void addEdge(size_t tail, size_t head)
void addEdge(T[] edgeList)

Add new edges to the graph. These may be provided either singly, by passing an individual (tail, head) pair, or en masse by passing an array whose entries are [tail1, head1, tail2, head2, ...]. Duplicate edges are permitted.

degree
size_t degree(size_t v)

Provides the degree of a vertex v in an undirected graph.

degreeIn
size_t degreeIn(size_t v)
degreeOut
size_t degreeOut(size_t v)

Provide respectively the in- and out-degrees of a vertex v, i.e. the number of vertices to which v is connected by respectively incoming or outgoing links. If the graph is undirected, these values are identical and the general degree method is also defined.

edge
auto edge()

Returns a list of all edges in the graph in the form of a list of (tail, head) vertex pairs.

edgeCount
size_t edgeCount()

Total number of edges in the graph.

edgeID
size_t edgeID(size_t tail, size_t head)

Returns the edge index for a given (tail, head) vertex pair. If (tail, head) is not an edge, will throw an exception.

incidentEdges
auto incidentEdges(size_t v)

Returns the IDs of edges respectively incoming to or outgoing from the specified vertex v. If the graph is undirected the two will be identical and the general method incidentEdges is also defined.

incidentEdgesIn
auto incidentEdgesIn(size_t v)
incidentEdgesOut
auto incidentEdgesOut(size_t v)

Returns the IDs of edges respectively incoming to or outgoing from the specified vertex v. If the graph is undirected the two will be identical and the general method incidentEdges is also defined.

isEdge
bool isEdge(size_t tail, size_t head)

Checks if a given (tail, head) vertex pair forms an edge in the graph.

isVertex
bool isVertex(T v)
Undocumented in source. Be warned that the author may not have intended to support it.
neighbours
auto neighbours(size_t v)

Returns the IDs of vertices connected to v via incoming or outgoing links. If the graph is undirected the two will be identical and the general neighbours method is also defined.

neighboursIn
auto neighboursIn(size_t v)
neighboursOut
auto neighboursOut(size_t v)

Returns the IDs of vertices connected to v via incoming or outgoing links. If the graph is undirected the two will be identical and the general neighbours method is also defined.

vertexCount
size_t vertexCount()
size_t vertexCount(size_t n)

Get or set the total number of vertices in the graph. Will throw an exception if resetting the number of vertices would delete edges.

Meta