| igraph Reference Manual |
|---|
int igraph_ring(igraph_t *graph, igraph_integer_t n, igraph_bool_t directed, igraph_bool_t mutual, igraph_bool_t circular);
Arguments:
|
Pointer to an uninitialized graph object. |
|
The number of vertices in the ring. |
|
Logical, whether to create a directed ring. |
|
Logical, whether to create mutual edges in a directed ring. It is ignored for undirected graphs. |
|
Logical, if false, the ring will be open (this is not a real ring actually). |
Returns:
Error code:
|
Time complexity: O(|V|), the number of vertices in the graph.
See also:
|
<< 1.7. igraph_lattice — Creates most kind of lattices. |
1.9. igraph_tree — Creates a tree in which almost all vertices have the same number of children. >> |