Main Content

isspantree (biograph)

(To be removed) Determine if tree created from biograph object is spanning tree

isspantree (biograph) will be removed in a future release. 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.

Syntax

TF = isspantree(BGObj)

Arguments

BGObj Biograph object created by biograph (object constructor).

Description

Tip

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

TF = isspantree(BGObj) returns logical 1 (true) if the N-by-N adjacency matrix extracted from a biograph object, BGObj, is a spanning tree, and logical 0 (false) otherwise. A spanning tree must touch all the nodes and must be acyclic. The lower triangle of the N-by-N adjacency matrix represents an undirected graph, and all nonzero entries indicate the presence of an edge.

Note

The function ignores the direction of the edges in the Biograph object.

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

Warns starting in R2022a