1 (defun $nelder_mead
(expr vars init
)
2 (let* ((fun (coerce-float-fun expr vars
))
4 (mfuncall '$apply fun
`((mlist simp
) ,@(loop for i across arr collect i
)))))
5 (init (make-array ($length init
) :initial-contents
(cdr ($float init
)))))
7 (xk fk fv
) (neldermead:grnm-optimize fun1 init
:verbose nil
)
8 (declare (ignore fk fv
))
9 `((mlist simp
) ,@(mapcar #'(lambda (x y
) `((mequal simp
) ,x
,y
))
11 (loop for i across xk collect i
))))))