| make_circulant | R Documentation |
A circulant graph C_n^{\textrm{shifts}} consists of n vertices
v_0, \ldots, v_{n-1} such that for each s_i in the list of offsets
shifts, v_j is connected to v_{(j + s_i) \mod n} for all j.
make_circulant(n, shifts, directed = FALSE)
circulant(n, shifts, directed = FALSE)
n |
Integer, the number of vertices in the circulant graph. |
shifts |
Integer vector, a list of the offsets within the circulant graph. |
directed |
Boolean, whether to create a directed graph. |
The function can generate either directed or undirected graphs. It does not generate multi-edges or self-loops.
An igraph graph.
Other deterministic constructors:
graph_from_atlas(),
graph_from_edgelist(),
graph_from_literal(),
make_(),
make_chordal_ring(),
make_empty_graph(),
make_full_citation_graph(),
make_full_graph(),
make_full_multipartite(),
make_graph(),
make_lattice(),
make_ring(),
make_star(),
make_tree(),
make_turan(),
make_wheel()
# Create a circulant graph with 10 vertices and shifts 1 and 3
g <- make_circulant(10, c(1, 3))
plot(g, layout = layout_in_circle)
# A directed circulant graph
g2 <- make_circulant(10, c(1, 3), directed = TRUE)
plot(g2, layout = layout_in_circle)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.