transClos | R Documentation |
Computes the transitive closure of a graph (undirected or directed acyclic).
transClos(amat)
amat |
a Boolean matrix with dimnames representing the adjacency matrix of a graph. |
The transitive closure of a directed graph with adjacency matrix A
is a
graph with adjacency matrix A^*
such that A^*_{i,j} = 1
if there is a directed path from i
to j
. The transitive
closure of an undirected graph is defined similarly (by substituting
path to directed path).
A |
The adjacency matrix of the transitive closure. |
Giovanni M. Marchetti
DAG
, UG
## Closure of a DAG
d <- DAG(y ~ x, x ~ z)
transClos(d)
## Closure of an UG
g <- UG(~ x*y*z+z*u+u*v)
transClos(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.