UndirectedGraphQ

UndirectedGraphQ[g]

yields True if the graph g is an undirected graph and False otherwise.

Details

  • A graph is undirected if every edge in the graph is undirected.

Examples

open allclose all

Basic Examples  (2)

Test whether a graph is undirected:

UndirectedGraphQ gives False for inputs that are not undirected graphs:

Scope  (6)

UndirectedGraphQ works with undirected graphs:

Directed graphs:

Multigraphs:

Mixed graphs:

UndirectedGraphQ gives False for anything that is not an undirected graph:

UndirectedGraphQ works with large graphs:

Properties & Relations  (5)

The empty graphs are undirected graphs:

An undirected graph can have self-loops:

A graph is either undirected or directed:

A symmetric adjacency matrix is interpreted to be an undirected graph:

Use DirectedEdges->True to interpret it as a directed graph:

The incidence matrix of an undirected graph has no negative entries:

Possible Issues  (1)

UndirectedGraphQ gives False for non-explicit graphs:

Introduced in 2010
 (8.0)