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:

Wolfram Research (2010), GraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphQ.html.

Text

Wolfram Research (2010), GraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphQ.html.

CMS

Wolfram Language. 2010. "GraphQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GraphQ.html.

APA

Wolfram Language. (2010). GraphQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphQ.html

BibTeX

@misc{reference.wolfram_2023_graphq, author="Wolfram Research", title="{GraphQ}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/GraphQ.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_graphq, organization={Wolfram Research}, title={GraphQ}, year={2010}, url={https://reference.wolfram.com/language/ref/GraphQ.html}, note=[Accessed: 19-March-2024 ]}