pathConnected: Find vertices in subset connected to vertex

View source: R/Adjacencies.R

pathConnectedR Documentation

Find vertices in subset connected to vertex

Description

Function for finding nodes in a set connected to a vertex via paths in the original graph

Usage

pathConnected(graph, v, D, etype, dir, verbose = FALSE)

Arguments

graph

an object of class mixedgraph

v

vertex to check

D

set to look for paths to

etype

edge types to use

dir

integer vector of directions

verbose

logical: should additional information be provided?

Details

This function will look for paths in graph from v that only use the edge types in etype and the directions specified, and stop whenever a path hits something in D. It then outputs the subset of elements of D that it hits.

Note that for directed edges, dir defaults to 1, and so only follows the canonical direction of the edge. Set to 0 if all directions are valid.


rje42/MixedGraphs documentation built on March 20, 2024, 8:09 a.m.