WLJS LogoWLJS Notebook

EmptyGraphQ

EmptyGraphQ[g] yields True if g is an empty graph and False otherwise.

Examples

Check if graph is empty:

EmptyGraphQ[Graph[{}]]
(* True *)

Non-empty graph:

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

Please visit the official Wolfram Language Reference for more details.

On this page