Description Usage Arguments Details Value Author(s) References Examples
edmondsOptimumBranching description
1 |
g |
instance of class graphNEL from Bioconductor graph class |
This is an implementation of Edmonds' algorithm to find optimum branching in a directed graph. See references for details.
A list with three elements: edgeList, weights, and nodes for the optimum branching traversal
Li Long <li.long@isb-sib.ch>
See Edmonds' Algorithm on https://github.com/atofigh/edmonds-alg
1 2 3 4 5 6 7 8 9 10 | V <- LETTERS[1:4]
g <- new("graphNEL", nodes=V, edgemode="directed")
g <- addEdge(V[1+0],V[1+1],g, 3)
g <- addEdge(V[1+0],V[2+1],g, 1.5)
g <- addEdge(V[1+0],V[3+1],g, 1.8)
g <- addEdge(V[1+1],V[2+1],g, 4.3)
g <- addEdge(V[1+2],V[3+1],g, 2.2)
x11 <- edmondsOptimumBranching(g)
x11
|
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, basename, cbind, colMeans, colSums, colnames,
dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
intersect, is.unsorted, lapply, lengths, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min
$edgeList
[,1] [,2] [,3]
from "A" "B" "C"
to "B" "C" "D"
$weights
[,1] [,2] [,3]
weight 3 4.3 2.2
$nodes
[1] "A" "B" "C" "D"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.