order_best {PairViz} | R Documentation |
Uses brute-force enumeration to find the best hamiltonian on the complete graph on 1..n.
Description
Returns the best hamiltonian
Usage
order_best(d, maxexact=9,nsamples=50000,path_weight=sum,
cycle=FALSE,path_dir = path_cor,...)
Arguments
d |
A |
maxexact |
If the sequence length is |
nsamples |
If the sequence length is |
cycle |
If |
path_weight |
Combines edge weights into a single path/cycle weight. |
path_dir |
If a function is provided, used to re-orient the cycle/path. Default function is |
... |
Ignored. |
Details
Requires package gtools.
Currently it is possible to find the best hamiltonian by complete enumeration for up to 10 nodes.
When path_dir
is non NULL, the returned hamiltonian is also optimally oriented using best_orientation
, which compares orientations via path_dir
.
Value
A vector containing a permutation of 1..n
Author(s)
C.B. Hurley and R.W. Oldford
References
see overview
See Also
Examples
require(PairViz)
order_best(eurodist)