Description Usage Arguments Details Value Author(s) Examples
An eulerian path is a path in a graph which visits every edge exactly once. This function returns an eulerian path from a graph (if there is any). It works for both directed and undirected graphs.
1 |
graph |
a |
start |
|
If start
is not NULL
, then eulerian returns a path starting from it. Otherwise, the start node is automatically selected.
A character vector representing an eulerian path/cycle in graph
. Each entry in the vector represents the name of a node in the graph.
Ashis Saha
1 2 3 4 5 6 7 8 9 10 | require(graph)
require(eulerian)
g <- new("graphNEL", nodes=LETTERS[1:4], edgemode="uirected")
g <- addEdge(graph=g, from=LETTERS[1:3], to=LETTERS[2:4])
ep <- eulerian(g)
g <- new("graphNEL", nodes=as.character(1:10), edgemode="directed")
g <- addEdge(graph=g, from=c("1","2","2","3","4","5","6","6","7","8","9","10"),
to=c("10","1","6","2","2","4","5","8","9","7","6","3"))
ep <- eulerian(g, "6")
|
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, cbind, colMeans, colSums, colnames, 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.