WLJS LogoWLJS Notebook

SimpleGraphQ

SimpleGraphQ[g] yields True if the graph g is a simple graph and False otherwise.

Examples

Check if a graph is simple:

SimpleGraphQ[Graph[{1 -> 2, 2 -> 3}]]
(* True *)

A multigraph is not simple:

SimpleGraphQ[Graph[{1 -> 2, 1 -> 2}]]
(* False *)

Please visit the official Wolfram Language Reference for more details.

On this page