| igraph Reference Manual |
|---|
int igraph_adjlist(igraph_t *graph, const igraph_adjlist_t *adjlist, igraph_bool_t directed, igraph_bool_t duplicate);
An adjacency list is list of vectors, containing the neighbors
of all vertices. For operations that involve many changes of the
graph structure, it is recommended that you convert the graph into
and adjacency list via igraph_adjlist_init(), perform the
modifications (these are cheap for an adjacency list) and then
recreate the igraph graph via this function.
Arguments:
|
Pointer to an uninitialized graph object. |
|
The adjacency list. |
|
Logical, whether or not to create a directed graph. |
|
Logical, for undirected graphs this specified whether each edge is included twice, in the vectors of both adjacenct vertices. If this is false (0), then it is assumed that every edge is included only once. This argument is ignored for directed graphs. |
Returns:
Error code. |
See also:
|
Time complexity: O(|V|+|E|).
<< 1.4. igraph_weighted_adjacency — Creates a graph object from a weighted adjacency matrix. |
1.6. igraph_star — Creates a star graph, every vertex connects only to the center. >> |