getTransitiveClosureMat {BiCausality} | R Documentation |
getTransitiveClosureMat function
Description
getTransitiveClosureMat is a support function for inferring a transitive-closure adjacency matrix.
Usage
getTransitiveClosureMat(adjMat)
Arguments
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. |
Value
This function returns a transitive-closure adjacency matrix.
Examples
# 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)
[Package BiCausality version 0.1.4 Index]