transitive.closure {mnem} | R 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)

[Package mnem version 1.6.5 Index]