knotoptim {knotR} | R Documentation |
Optimization of knot appearance
Description
Optimization of knot appearance using user-definable objective functions
Usage
knotoptim(svg, weights=1, symobj=NULL,
Mver = NULL, xver = NULL, Mhor = NULL, xhor = NULL, Mrot = NULL,
mcdonalds = FALSE, celtic = FALSE, ou, prob = 0, useNLM=TRUE, ...)
Arguments
svg |
Name of an svg file to read |
Mver , xver , Mhor , xhor , Mrot , mcdonalds , celtic |
Arguments passed to
|
symobj |
A symmetry object |
ou |
An overunder object |
prob |
The probability of plotting a knotplot; this is slow so don't make this too big |
weights |
A vector of weights, defaulting to all ones, passed to
|
useNLM |
Boolean, with default |
... |
Further arguments passed to |
Details
Function knotoptim()
is a generic optimization routine that
starts from an svg file and minimizes the knot's badness()
.
The weights
argument is documented more fully at
badness.Rd
.
Value
Returns a knot object
Author(s)
Robin K. S. Hankin
See Also
Examples
## Not run: #takes too long
knotoptim(
svg = system.file("4_1_first_draft.svg",package="knotR"),
Mver = rbind(c(2,3),c(9,7),c(10,6),c(1,4),c(5,11)),
xver = 8, # node on vertical axis
ou = rbind( c(1,5), c(9,2), c(4,8),c(6,11)),
prob = 0.1,
iterlim = 100, print.level=2)
## End(Not run)
[Package knotR version 1.0-4 Index]