Description Usage Arguments Value See Also
searchFlowPath
go through a given graph and obtains
a maximum flow path between source and sink nodes. The
function uses a deep-first search estrategy.
1 2 | searchFlowPath(nodes, arcs, source.node = 1,
sink.node = nodes[length(nodes)])
|
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. |
source.node |
number pointing to the source node of the graph. It's node 1 by default. |
sink.node |
number pointing to the sink node of the graph. It's the last node by default. |
searchFlowPath
returns a list with two elements:
path.nodes |
vector with nodes of the path. |
path.arcs |
matrix with the list of arcs that form the maximum flow path. |
This function is an auxiliar function used in ghTreeGusfield and getMinimumCutTree.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.