simplegraph (version 1.0.0)

is_loopy: 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)

Value

Logical scalar.

Arguments

graph

The input graph.

See Also

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

Examples

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

G2 <- simplify(G)
is_loopy(G2)

Run the code above in your browser using DataCamp Workspace