MinCostArborescence {rlemon} | R Documentation |
Solver for Minimum Cost Arborescence
Description
Finds the minimum cost arborescence of a graph, returning both the cost and the pairs of nodes for the edges in the arborescence.
Usage
MinCostArborescence(
arcSources,
arcTargets,
arcDistances,
sourceNode,
numNodes,
algorithm = "MinCostArborescence"
)
Arguments
arcSources |
Vector corresponding to the source nodes of a graph's edges |
arcTargets |
Vector corresponding to the destination nodes of a graph's edges |
arcDistances |
Vector corresponding to the distances of nodes of a graph's edges |
sourceNode |
The source node |
numNodes |
The number of nodes in the graph |
algorithm |
Choices of algorithm include "MinCostArborescence". "MinCostArborescence" is the default. |
Details
For details on LEMON's implementation, including differences between the algorithms, see https://lemon.cs.elte.hu/pub/doc/1.3.1/a00264.html.
Value
A named list containing three entries: 1) "sources": a vector corresponding the source nodes of the edges in the tree, 2) "targets": a vector corresponding the target nodes of the edges in the tree, and 3) "cost": the total cost of the arborescence.