getReachibleNodes: getReachibleNodes function

Description Usage Arguments Value Examples

View source: R/getReachibleNodes.R

Description

getReachibleNodes is a support function for inferring reachable nodes that have some directed path to a node targetNode.

Usage

1
getReachibleNodes(adjMat, targetNode)

Arguments

adjMat

is an adjacency matrix of a following network of which its elements are binary: zero for no edge, and one for having an edge.

targetNode

is a node in a graph that we want to find a set of nodes that can reach this target node via some paths.

Value

This function returns a set of node IDs followers that have some directed path to a node targetNode.

Examples

1
2
3
4
5
6
7
8
# 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.

followers<-getReachibleNodes(adjMat=A,targetNode=1)$followers

mFLICA documentation built on April 4, 2020, 1:13 a.m.