transitive.reduction {mnem} | R Documentation |
Computes the transitive reduction of a adjacency matrix or graphNEL object. Originally imported from the package 'nem'.
transitive.reduction(g)
g |
adacency matrix or graphNEL object |
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)