Learn R Programming

paircompviz (version 1.10.0)

transReduct: Remove transitive edges from an adjacency matrix

Description

This function removes transitive edges from an adjacency matrix.

Usage

transReduct(e)

Arguments

e
an adjacency matrix, i.e. a rectangular matrix with value $e_{i,j}$ above zero indicating an edge between vertices $i$ and $j$ of the corresponding graph.

Value

An adjacency matrix $e$ with transitive edges being removed.

Details

This function takes an adjacency matrix as the argument e. Both rows and columns correspond to graph vertices, with value $e_{i,j}$ above zero indicating an edge between vertices $i$ and $j$. The function removes all transitive edges, i.e. sets to zero corresponding elements of matrix $e$. The transitive edge is such an edge between vertices $i$ and $j$ that after removing it from the graph, there still exists a path from $i$ to $j$.

See Also

paircomp, hasse

Examples

Run this code
  e <- matrix(c(0, 1, 1, 0, 0, 1, 0, 0, 0), nrow=3, byrow=TRUE)
  transReduct(e)

Run the code above in your browser using DataLab