WLJS LogoWLJS Notebook

EdgeQ

EdgeQ[g, e] yields True if e is an edge in the graph g and False otherwise.

Examples

Check if edge exists:

g = Graph[{1 -> 2, 2 -> 3}];
EdgeQ[g, 1 -> 2]
(* True *)
EdgeQ[g, 1 -> 3]
(* False *)

Please visit the official Wolfram Language Reference for more details.

On this page