GraphQ

GraphQ[g]

yields True if g is a valid Graph object and False otherwise.

Examples

open allclose all

Basic Examples  (2)

Test whether an object is a valid Graph object:

A Graphics object that contains a picture of a graph is not a valid Graph object:

Scope  (6)

GraphQ works with undirected graphs:

Directed graphs:

Multigraphs:

Mixed graphs:

GraphQ gives False for anything that is not a graph:

GraphQ works with large graphs:

Properties & Relations  (5)

Test whether a graph is directed or undirected:

Test whether a graph is simple:

A graph can have self-loops:

Test whether a graph is bipartite:

Test whether a graph is weighted:

Possible Issues  (1)

GraphQ gives False for non-explicit graphs:

For an explicit integer it is a graph object:

Introduced in 2010
 (8.0)