Fits an elastic mean for open curves. Is usually called from
compute_elastic_mean.
fit_mean(srv_data_curves, knots, max_iter, type, eps)a list
with entries
"smooth" or "polygon"
coefs srv spline coefficients of the estimated mean
spline knots
optimal parametrization
list of data.frames with srv vectors in each row.
Usually a result of a call to get_srv_from_points
set of knots for the mean spline curve
maximal number of iterations
if "smooth" linear srv-splines are used which results in a differentiable mean curve if "polygon" the mean will be piecewise linear.
the algorithm stops if L2 norm of coefficients changes less