getWeight | R Documentation |
Get the overall costs/weight of a subgraph given its edgelist.
getWeight(graph, edgelist, obj.types = NULL)
graph |
[ |
edgelist |
[ |
obj.types |
[ |
[numeric(2)
] Weight vector.
# generate a random bi-objective graph
g = genRandomMCGP(5)
# generate a random Pruefer code, i.e., a random spanning tree of g
pcode = sample(1:5, 3, replace = TRUE)
getWeight(g, prueferToEdgeList(pcode))
getWeight(g, prueferToEdgeList(pcode), obj.types = "bottleneck")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.