getNodePaths: Get all edges leading to/from a node

View source: R/subnetworks.R

getNodePathsR Documentation

Get all edges leading to/from a node

Description

Get all edges leading to/from a node

Usage

getNodePaths(mat, from = NULL, to = NULL)

Arguments

mat

An adjacency matrix

from, to

Node names between which the shortest path must be computed. At least one of these must be given. If only from is given, then this returns the shortest paths from this node to all other nodes, and if only to is given, then this returns the shortest paths to this node from all other nodes.

Value

The same adjacency matrix, but the only non-null values are those edges on the shortest path from the from node and/or to the to node.

Author(s)

Sercan Kahveci


Spiritspeak/skMisc documentation built on April 12, 2025, 5:40 a.m.