transitive.closure: Transitive closure of a directed acyclic graph (dag)

View source: R/mnems.r

transitive.closureR Documentation

Transitive closure of a directed acyclic graph (dag)

Description

Computes the transitive closure of a dag or only of a deletion/addition of an edge

Usage

transitive.closure(g, u = NULL, v = NULL)

Arguments

g

graph as matrix or graphNEL object

u

index of the parent of an edge (optional)

v

index of the child of an edge (optional)

Value

transitively closed matrix or graphNEL

Author(s)

Martin Pirkl

Examples

g <- matrix(c(0,0,0,1,0,0,0,1,0), 3)
transitive.closure(g)

cbg-ethz/mnem documentation built on Feb. 5, 2024, 5:46 a.m.