Main Content

graphisspantree

(Removed) Determine if tree is spanning tree

graphisspantree has been removed. For details, see Version History.

Syntax

TF = graphisspantree(G)

Arguments

G N-by-N adjacency matrix whose lower triangle represents an undirected graph. Nonzero entries in matrix G indicate the presence of an edge.

Description

Tip

For introductory information on graph theory functions, see Graph Theory Functions.

TF = graphisspantree(G) returns logical 1 (true) if G is a spanning tree, and logical 0 (false) otherwise. A spanning tree must touch all the nodes and must be acyclic. G is an N-by-N sparse matrix whose lower triangle represents an undirected graph. Nonzero entries in matrix G indicate the presence of an edge.

References

[1] Siek, J.G., Lee, L-Q, and Lumsdaine, A. (2002). The Boost Graph Library User Guide and Reference Manual, (Upper Saddle River, NJ:Pearson Education).

Version History

Introduced in R2006b

expand all

R2022b: Removed

graphisspantree has been removed. A graph is a spanning tree if and only if all nodes are reachable from an arbitrary start node, and E == N-1, where E is the number of edges and N is the number of nodes. You can use either bfsearch or dfsearch to check if such conditions are true for a given graph.

See Also

|