shortestPathDistance: Return a Matrix with the shortest path distance between nodes...

Description Usage Arguments Value Examples

View source: R/edgefinder.R

Description

return the adjacency matrix of expMat connecting neighbors up to numSteps away.

Usage

1
shortestPathDistance(AdjMat, numSteps = 0)

Arguments

AdjMat

An adjacency Matrix (0/1).

numSteps

The maximum number of edges between pairs of nodes. If numSteps=0, returns the input matrix. numSteps=1 adds neighbors of direct neighbors, etc.

Value

A Matrix containing the shortset paths between nodes i and j

Examples

1
2
3
4
5
   data(SIM)
   Sres <- edgefinder(SIM, ttl = "hub network")
   AdjMat1 <- shortestPathDistance(Sres$AdjMat, numSteps=50)
   max(AdjMat1)
   Matrix::image(AdjMat1)

haimbar/edgefinder documentation built on Dec. 20, 2021, 2:45 p.m.