Main Content

graphisdag

(To be removed) Test for cycles in directed graph

graphisdag will be removed in a future release. Use isdag instead.

Syntax

graphisdag(G)

Arguments

G N-by-N adjacency matrix that represents a directed 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.

graphisdag(G) returns logical 1 (true) if the directed graph represented by matrix G is a directed acyclic graph (DAG) and logical 0 (false) otherwise. G is an N-by-N adjacency matrix that represents a directed 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

Warns starting in R2022a

Behavior changed in R2021b

See Also