eulerian | R Documentation |
A generic function that returns an eulerian (or nearly eulerian)
path based on self
.
eulerian(self, start=NULL,weighted=TRUE)
self |
– see below |
start |
– see below |
weighted |
– see below |
A vector representing the eulerian- a character vector of node names for a graph, otherwise a numeric vector. If the graph is not connected, the result is a list of eulerians for each connected component.
Uses etour
to construct the eulerian. If weighted
is TRUE a weighted eulerian is constructed, otherwise weights are ignored. A non-null start
is the eulerian starting point.
Augments the graph using mk_euler_graph
, then invokes eulerian again on the augmented verion. If self is not connected, (approximate) eulerians are formed for each connected component, which are returned as a list.
Builds a graph using mk_euler_graph
, then invokes eulerian again on the result.
Builds a graph with self nodes using mk_euler_graph
, then invokes eulerian again on the result.
Builds a graph using mk_euler_graph
, then invokes eulerian again on the result.
C.B. Hurley and R.W. Oldford
C. Hierholzer (1873). Uber die Moglichkeit, einen Linienzug ohne Wiederholung und ohne Unterbrechung zu umfahren. Math. Annalen VI, pp. 30-32.
Also, see overview
require(PairViz) d <- as.matrix(eurodist)[1:8,1:8] # pick the first 8 cities eulerian(d) eulerian(d, weighted=FALSE) # In this case, starts at city 1 and ends at city 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.