Skip to contents

Remove Self-Loops from an Adjacency List

Usage

rm.self.loops(adj.list)

Arguments

adj.list

Adjacency list.

Value

The adjacency list with entries equal to their vertex index removed.

Examples

rm.self.loops(list(c(1L, 2L), c(1L, 2L)))
#> [[1]]
#> [1] 2
#> 
#> [[2]]
#> [1] 1
#>