transitive.reduction: Transitive reduction

transitive.reductionR Documentation

Transitive reduction

Description

Computes the transitive reduction of an adjacency matrix or graphNEL object. Originally imported from the package 'nem'.

Usage

transitive.reduction(g)

Arguments

g

adjacency matrix or graphNEL object

Value

transitively reduced adjacency matrix

Author(s)

Holger Froehlich

References

R. Sedgewick, Algorithms, Pearson, 2002.

Examples

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)

cbg-ethz/mnem documentation built on Nov. 7, 2024, 7:35 p.m.