% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make.R
\name{make_circulant}
\alias{make_circulant}
\alias{circulant}
\title{Create a circulant graph}
\usage{
make_circulant(n, shifts, directed = FALSE)

circulant(n, shifts, directed = FALSE)
}
\arguments{
\item{n}{Integer, the number of vertices in the circulant graph.}

\item{shifts}{Integer vector, a list of the offsets within the circulant graph.}

\item{directed}{Boolean, whether to create a directed graph.}
}
\value{
An igraph graph.
}
\description{
A circulant graph \eqn{C_n^{\textrm{shifts}}} consists of \eqn{n} vertices
\eqn{v_0, \ldots, v_{n-1}} such that for each \eqn{s_i} in the list of offsets
\code{shifts}, \eqn{v_j} is connected to \eqn{v_{(j + s_i) \mod n}} for all \eqn{j}.
}
\details{
The function can generate either directed or undirected graphs.
It does not generate multi-edges or self-loops.
}
\section{Related documentation in the C library}{
\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_circulant}{\code{circulant()}}
}

\examples{
# 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)
}
\seealso{
Other deterministic constructors: 
\code{\link{graph_from_atlas}()},
\code{\link{graph_from_edgelist}()},
\code{\link{graph_from_literal}()},
\code{\link{make_}()},
\code{\link{make_chordal_ring}()},
\code{\link{make_empty_graph}()},
\code{\link{make_full_citation_graph}()},
\code{\link{make_full_graph}()},
\code{\link{make_full_multipartite}()},
\code{\link{make_graph}()},
\code{\link{make_lattice}()},
\code{\link{make_ring}()},
\code{\link{make_star}()},
\code{\link{make_tree}()},
\code{\link{make_turan}()},
\code{\link{make_wheel}()}
}
\concept{deterministic constructors}
