Learn R Programming

ppsbm (version 1.0.0)

listNodePairs: List node pairs

Description

Create the list of all node pairs

Usage

listNodePairs(n, directed = TRUE)

Value

Matrix with two columns which lists all the possible node pairs. Each row is a node pair.

Arguments

n

Total number of nodes, \(1 \le i \le n\)

directed

Boolean for directed (TRUE) or undirected (FALSE) case

Examples

Run this code
# List all the node pairs with 10 nodes, for directed and undirected graphs

n <- 10
listNodePairs(n, TRUE)
listNodePairs(n, FALSE)

Run the code above in your browser using DataLab