is_loopy: Is this a loopy graph?

View source: R/multigraphs.R

is_loopyR Documentation

Is this a loopy graph?

Description

A loopy graph has at least one loop edge: an edge from a vertex to itself.

Usage

is_loopy(graph)

Arguments

graph

The input graph.

Value

Logical scalar.

See Also

Other multigraphs: is_multigraph(), is_simple(), remove_loops(), remove_multiple(), simplify()

Examples

G <- graph(list(A = c("A", "B", "B"), B = c("A", "C"), C = "A"))
is_loopy(G)

G2 <- simplify(G)
is_loopy(G2)

simplegraph documentation built on Aug. 31, 2023, 9:07 a.m.