as_adj_list1: Adjacency list

View source: R/graph_structures.R

as_adj_list1R Documentation

Adjacency list

Description

Create adjacency lists from a graph, either for adjacent edges or for neighboring vertices. This version is faster than the version of igraph but less general.

Usage

as_adj_list1(g)

Arguments

g

An igraph object

Details

The function does not have a mode parameter and returns the same neighbors as as_adj_list(g, mode = "all"), as plain integer vectors. For directed graphs, both in- and out-neighbors are returned.

Value

A list of numeric vectors.

Author(s)

David Schoch

Examples

library(igraph)
g <- make_ring(10)
as_adj_list1(g)

netUtils documentation built on Sept. 30, 2026, 5:10 p.m.