dfsall: Depth-First-Search all loops

View source: R/depth_first_search.R

dfsallR Documentation

Depth-First-Search all loops

Description

This recursive Depth-First-Search function finds all loops in the foodweb starting from a certain node and writes them to a text file.

Usage

dfsall(AM, node, visited, pathway, started, file, start)

Arguments

AM

Adjacency matrix.

node

Current node.

visited

Logical vector which stores if a node is visited before.

pathway

Integer vector that tracks the pathway to current node.

started

Logical vector which stores which nodes have been used before as starting node.

file

String with name for textfile that will store loops.

start

Is integer with the current start node.

Value

No returned value, writes .txt file to working directory.


dswdejonge/fwstability documentation built on Dec. 7, 2022, 7:24 p.m.