star: Create common configurations

starR Documentation

Create common configurations

Description

star creates one or more configurations in which n - 1 vertices are connected to the first vertex.

ring creates one or more configurations in which vertices are serially connected.

subgroup creates one or more configurations in which vertices are connected within or between subgroups.

subgroup_all creates all possible subgroup configurations for n vertices.

Usage

star(
  n,
  group_size = max(n),
  mode = c("undirected", "mutual", "in", "out"),
  directed = TRUE,
  loops = FALSE,
  value = 1L,
  type = ifelse(value %in% c(0:1, NA), "binary", "weighted")
)

ring(
  n,
  group_size = max(n),
  mode = c("undirected", "mutual", "in", "out"),
  loops = FALSE,
  value = 1L,
  type = ifelse(value %in% c(0:1, NA), "binary", "weighted")
)

subgroup(
  ...,
  group_size = NULL,
  mode = c("undirected", "mutual", "in", "out"),
  relation = c("within", "between"),
  loops = FALSE,
  value = 1L,
  type = ifelse(value %in% c(0:1, NA), "binary", "weighted")
)

subgroup_all(
  n,
  group_size = max(n),
  min_size = 2,
  mode = c("mutual", "in", "out"),
  relation = c("within", "between"),
  loops = FALSE,
  value = 1L,
  type = ifelse(value %in% c(0:1, NA), "binary", "weighted")
)

Arguments

n

Scalar or vector for the number vertices with edges.

group_size

Size of the group.

mode

Can be "undirected", "mutual", "in", or "out": for edge (i, j) and matrix M, "out" creates edge M(i, j), "in" creates edge M(j, i), and "mutual" creates both. When "undirected", the configuration is set to directed = FALSE and mutual edges are created.

loops

When FALSE, diagonal values are set to NA.

value

Edge value (or weight) to set.

...

One or more vectors of subgroup sizes. If relation = "between", at least two numbers or vectors are required.

relation

Specifies whether edges are "within" or "between" subgroups. Default is "within".

min_size

Smallest subgroup size allowed. Default is 2.

Value

A configuration_set object.

Examples

star(4)
star(2:4, 6)
ring(4)
ring(2:4, 6)
subgroup(4)
subgroup(2, 4)
subgroup(2:4)
subgroup(2, 2:4, 3)
subgroup(2, 4, group_size = 8, relation = "between")
subgroup_all(6)
subgroup_all(6, relation = "between")
subgroup_all(6, group_size = 8)

stephen-l-jones/SmallGroupNetwork documentation built on April 25, 2022, 11:15 p.m.