File: make_lattice.Rd

package info (click to toggle)
r-cran-igraph 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,044 kB
  • sloc: ansic: 204,981; cpp: 21,711; fortran: 4,090; yacc: 1,229; lex: 519; sh: 52; makefile: 8
file content (78 lines) | stat: -rw-r--r-- 2,311 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make.R
\name{make_lattice}
\alias{make_lattice}
\alias{lattice}
\title{Create a lattice graph}
\usage{
make_lattice(
  dimvector = NULL,
  length = NULL,
  dim = NULL,
  nei = 1,
  directed = FALSE,
  mutual = FALSE,
  periodic = FALSE,
  circular = deprecated()
)

lattice(...)
}
\arguments{
\item{dimvector}{A vector giving the size of the lattice in each
dimension.}

\item{length}{Integer constant, for regular lattices, the size of the
lattice in each dimension.}

\item{dim}{Integer constant, the dimension of the lattice.}

\item{nei}{The distance within which (inclusive) the neighbors on the
lattice will be connected. This parameter is not used right now.}

\item{directed}{Whether to create a directed lattice.}

\item{mutual}{Logical, if \code{TRUE} directed lattices will be
mutually connected.}

\item{periodic}{Logical vector, Boolean vector, defines whether the generated lattice is
periodic along each dimension. This parameter may also be scalar boolen value which will
be extended to boolean vector with dimvector length.}

\item{circular}{Deprecated, use \code{periodic} instead.}

\item{...}{Passed to \code{make_lattice()}.}
}
\value{
An igraph graph.
}
\description{
\code{make_lattice()} is a flexible function, it can create lattices of
arbitrary dimensions, periodic or aperiodic ones. It has two
forms. In the first form you only supply \code{dimvector}, but not
\code{length} and \code{dim}. In the second form you omit
\code{dimvector} and supply \code{length} and \code{dim}.
}
\examples{
make_lattice(c(5, 5, 5))
make_lattice(length = 5, dim = 3)
}
\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_graph}()},
\code{\link{make_ring}()},
\code{\link{make_star}()},
\code{\link{make_tree}()}
}
\concept{Lattice}
\concept{deterministic constructors}
\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Generators.html#igraph_square_lattice}{\code{igraph_square_lattice()}}.}