is_loopy {simplegraph}R 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)

[Package simplegraph version 1.0.1 Index]