File: make_.Rd

package info (click to toggle)
r-cran-igraph 1.0.1-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 18,232 kB
  • sloc: ansic: 173,538; cpp: 19,365; fortran: 4,550; yacc: 1,164; tcl: 931; lex: 484; makefile: 149; sh: 9
file content (48 lines) | stat: -rw-r--r-- 1,435 bytes parent folder | download | duplicates (2)
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
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/make.R
\name{make_}
\alias{make_}
\title{Make a new graph}
\usage{
make_(...)
}
\arguments{
\item{...}{Parameters, see details below.}
}
\description{
This is is generic function for creating graphs.
}
\details{
\code{make_} is a generic function for creating graphs.
For every graph constructor in igraph that has a \code{make_} prefix,
there is a corresponding function without the prefix: e.g.
for \code{\link{make_ring}} there is also \code{\link{ring}}, etc.

The same is true for the random graph samplers, i.e. for each
constructor with a \code{sample_} prefix, there is a corresponding
function without that prefix.

These shorter forms can be used together with \code{make_}.
The advantage of this form is that the user can specify constructor
modifiers which work with all constructors. E.g. the
\code{link{with_vertex_}} modifier adds vertex attributes
to the newly created graphs.

See the examples and the various constructor modifiers below.
}
\examples{
r <- make_(ring(10))
l <- make_(lattice(c(3, 3, 3)))

r2 <- make_(ring(10), with_vertex_(color = "red", name = LETTERS[1:10]))
l2 <- make_(lattice(c(3, 3, 3)), with_edge_(weight = 2))

ran <- sample_(degseq(c(3,3,3,3,3,3), method = "simple"), simplified())
degree(ran)
is_simple(ran)
}
\seealso{
simplified with_edge_ with_graph_ with_vertex_
  without_loops without_multiples
}