best_orientation | R Documentation |
Re-orients a path/cycle, preserving adjacencies so that weights tend to decrease. From specifies the starting point, for cycles only.
best_orientation(path, d, cycle=FALSE, path_dir= path_cor, from=NULL)
path |
A vector giving a hamiltonian. |
d |
A |
cycle |
If |
path_dir |
A function used to evaluate a path start and orientation |
from |
Sepcifies the starting point, for cycles only. |
C.B. Hurley and R.W. Oldford
see overview
hpaths
, eulerian
.
require(PairViz) rdist <- function(n) { d <- matrix(0,n,n) d[lower.tri(d)] <- runif(n*(n-1)/2) return(as.dist(d)) } r <- rdist(7) best_orientation(1:7,r) best_orientation(1:7,r,cycle=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.