preference.game: Trait-based random generation

View source: R/games.R

preference.gameR Documentation

Trait-based random generation

Description

[Deprecated]

preference.game() was renamed to sample_pref() to create a more consistent API.

Usage

preference.game(
  nodes,
  types,
  type.dist = rep(1, types),
  fixed.sizes = FALSE,
  pref.matrix = matrix(1, types, types),
  directed = FALSE,
  loops = FALSE
)

Arguments

nodes

The number of vertices in the graphs.

types

The number of different vertex types.

type.dist

The distribution of the vertex types, a numeric vector of length ‘types’ containing non-negative numbers. The vector will be normed to obtain probabilities.

fixed.sizes

Fix the number of vertices with a given vertex type label. The type.dist argument gives the group sizes (i.e. number of vertices with the different labels) in this case.

pref.matrix

A square matrix giving the preferences of the vertex types. The matrix has ‘types’ rows and columns. When generating an undirected graph, it must be symmetric.

directed

Logical constant, whether to create a directed graph.

loops

Logical constant, whether self-loops are allowed in the graph.


igraph documentation built on Oct. 20, 2024, 1:06 a.m.