Description Usage Arguments Value
This function walks a given graph, directed or not,
searching for a walk from a starting node to a final node.
The searchWalk
function uses a deep-first search
strategy to returns the first open walk found, regardless
it has formed cycles or repeated nodes.
1 2 | searchWalk(nodes, arcs, directed = TRUE, start.node = nodes[1],
end.node = nodes[length(nodes)], method = NULL)
|
nodes |
vector containing the nodes of the graph, identified by a number that goes from 1 to the order of the graph. |
arcs |
matrix with the list of arcs of the graph. Each row represents one arc. The first two columns contain the two endpoints of each arc and the third column contains their weights. |
directed |
logical value indicating whether the
graph is directed ( |
start.node |
number with one node from which a walk start. |
end.node |
number with final node of the walk. |
method |
character string specifying which method
use to select the arcs that will form the open walk:
|
If searchWalk
found an open walk in the graph
returns TRUE
, a vector with the nodes of the walk
and a matrix with the list of arcs of it.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.