Static boolean value indicating whether or not the graph is directed. This is available for compile-time as well as runtime checks.
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.
Provides the degree of a vertex v in an undirected graph.
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.
Returns a list of all edges in the graph in the form of a list of (tail, head) vertex pairs.
Total number of edges in the graph.
Returns the edge index for a given (tail, head) vertex pair. If (tail, head) is not an edge, will throw an exception.
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.
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.
Checks if a given (tail, head) vertex pair forms an edge in the graph.
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.
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.
Get or set the total number of vertices in the graph. Will throw an exception if resetting the number of vertices would delete edges.
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.