transitive.reduction | R Documentation |
Computes the transitive reduction of an adjacency matrix or graphNEL object. Originally imported from the package 'nem'.
transitive.reduction(g)
g |
adjacency matrix or graphNEL object |
transitively reduced adjacency matrix
Holger Froehlich
R. Sedgewick, Algorithms, Pearson, 2002.
g <- matrix(c(0,0,0,1,0,0,0,1,0), 3)
rownames(g) <- colnames(g) <- seq_len(3)
g.tr <- transitive.reduction(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.