View source: R/transitiveClosure.R
Transitive closure of an adjacency matrix | R Documentation |
Returns the transitive closure of an adjacency matrix.
transitiveClosure(amat)
amat |
The adjacency matrix of a graph. |
A function that computes the transitive closure of a graph. The transitive closure C(G) of a graph is a graph which contains an edge between nodes u and v whenever there is a directed path from u to v (Skiena 1990, p. 203). http://mathworld.wolfram.com/TransitiveClosure.html
closure |
The transititve closure of the adjacency matrix representing a graph. |
Anna Roumpelaki
R implementation and documentation: Anna Roumpelaki <anna.roumpelaki@gmail.com>
Skiena S. (1990). Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley
# example adjacency matrix # simulate a dataset with continuous data dataset <- matrix( runif(300 * 20, 1, 100), nrow = 300 ) test <- pc.con( dataset, method = "pearson", alpha = 0.05 )$G transitiveClosure(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.