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

[Package simplegraph version 1.0.1 Index]