Learn R Programming

arkhe (version 0.2.2)

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)

Arguments

x

An adjacency matrix to be tested.

Value

A logical scalar.

References

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

See Also

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