get_adjlist: Get adjacency list

Description Usage Arguments Value Examples

Description

Get list containing adjacent, i.e., neighboring, nodes for each node in the graph. Nodes are returned as their row indices of the adjacency matrix.

Usage

1

Arguments

adj

numeric matrix specifying the adjacency matrix.

Value

A list of vectors containing the indices of adjacent nodes.

Examples

1
2
3
4
5
# generate watts strogatz graph
network = grow_ws(n = 6, k = 2, p = .5)

# transform to adjlist
get_adjlist(network)

memnet documentation built on May 2, 2019, 9:35 a.m.