is_simple: Is this a simple graph?

View source: R/multigraphs.R

is_simpleR Documentation

Is this a simple graph?

Description

A simple graph contains no loop and multiple edges.

Usage

is_simple(graph)

Arguments

graph

The input graph.

Value

Logical scalar.

See Also

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

Examples

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

G2 <- simplify(G)
is_simple(G2)

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