all.paths: all.paths

all.pathsR Documentation

all.paths

Description

Low level function to enumerate all elementary paths and cycles through graph

takes directed graph represented by n x n binary adjacency matrix A and outputs all cycles and paths between source.vertices, sink.vertices

Usage

## S3 method for class 'paths'
all(
  A,
  all = F,
  ALL = F,
  sources = c(),
  sinks = c(),
  source.vertices = sources,
  sink.vertices = sinks,
  exclude = NULL,
  verbose = FALSE,
  ...
)

Arguments

A

nxn adjacency matrix

all

logical flag, if all = T, will include all sources (parentless vertices) and sinks (childless vertices) in path computati

ALL

logical flag, if ALL = T, will also include vertices without outgoing and incoming edges in paths

sources

graph indices to treat as sources (by default is empty)

sinks

graph indices to treat as sinks (by default is empty)

verbose

logical flag

Value

list of integer vectors corresponding to indices in A (i.e. vertices) $paths = paths indices $cycles = cycle indices


mskilab/skitools documentation built on Aug. 31, 2023, 1:13 p.m.