as_adj_def: Create an adjacency matrix from a multigraph according to the...

View source: R/graphs.R

as_adj_defR Documentation

Create an adjacency matrix from a multigraph according to the definition

Description

Create an adjacency matrix using the definition, i.e. an entry equals 1 if there is an edge from the vertex in the column to the vertex in the row, and cycles are counted twice.

Usage

as_adj_def(g, ...)

Arguments

g

the graph (an igraph object)

...

additional arguments to be passed to the igraph function as_adj

Value

Adjacency matrix for graph g

Examples

g=igraph::graph_from_literal(1-2,2-2:3:3:4,3-4:5:6,5-1:1:1,6-6,simplify=FALSE)
as_adj_def(g)

smallstuff documentation built on June 2, 2022, 5:06 p.m.