Description Usage Arguments Value Examples
Given a graph with at least one minimum cost spanning tree,
the mstRules
function divides the cost of the tree
among the agents according to the most known rules: "Bird",
"Dutta-Kar", "Kar", "ERO".
1 |
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. |
rule |
denotes the chosen allocation rule: "Bird", "Dutta-Kar", "Kar" or "ERO". |
algorithm |
denotes the algorithm used with the ERO rule: "Kruskal". |
show.data |
logical value indicating if the function
displays the console output |
mstRules
returns a matrix with the agents and the
cost that each one of them has to pay. It also prints the
result in console.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.