Learn R Programming

arkhe (version 0.5.0)

predicate-graph: Graph Predicates

Description

is_dag() checks if a graph has a topological ordering (i.e. is a directed acyclic graph) using Kahn's algorithm.

Usage

is_dag(x)

Value

A logical scalar.

Arguments

x

An adjacency matrix to be tested.

References

Kahn, A. B. (1962). Topological sorting of large networks. Communications of the ACM, 5(11), p. 558-562. tools:::Rd_expr_doi("10.1145/368996.369025").

See Also

Other predicates: predicate-matrix, predicate-numeric, predicate-scalar, predicate-trend, predicate-type, predicate-utils