View source: R/getReachableNodes.R
getTransitiveClosureMat | R Documentation |
getTransitiveClosureMat is a support function for inferring a transitive-closure adjacency matrix.
getTransitiveClosureMat(adjMat)
adjMat |
is an adjacency matrix of a directed graph of which its elements are binary: zero for no edge, and one for having an edge. |
This function returns a transitive-closure adjacency matrix.
# Given an example of adjacency matrix
A<-matrix(FALSE,5,5)
A[2,1]<-TRUE
A[c(3,4),2]<-TRUE
A[5,3]<-TRUE
# Get a set of reachable nodes of targetNode.
trsClosureMat<-getTransitiveClosureMat(adjMat=A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.