\inputencoding{utf8}
\HeaderA{fminsearch.outputfun}{fminsearch Output Function Call}{fminsearch.outputfun}
\keyword{method}{fminsearch.outputfun}
%
\begin{Description}\relax
This function calls the output function and make it match neldermead
requirements. It is used in the \code{fminsearch} function as the
\code{outputcommand} element of the neldermead object (see
\code{?neldermead.new} and \code{?neldermead.configure}).
\end{Description}
%
\begin{Usage}
\begin{verbatim}
  fminsearch.outputfun(state = NULL, data = NULL, fmsdata = NULL)
\end{verbatim}
\end{Usage}
%
\begin{Arguments}
\begin{ldescription}
\item[\code{state}] The current state of the algorithm either 'init', 'iter' or
'done'.
\item[\code{data}] The data at the current state. This is a list with a 'type'
attribute set to 'T\_NMDATA' and  with the following elements:\begin{description}

\item[x] The current parameter estimates.
\item[fval] The current value of the cost function.
\item[simplex] The current simplex object.
\item[iteration] The number of iterations performed.
\item[funccount] The number of function evaluations.
\item[step] The type of step in the previous iteration.

\end{description}


\item[\code{fmsdata}] This is a list with a 'type' attribute set to 'T\_FARGS'
which contains specific data of the \code{fminsearch} algorithm: \begin{description}

\item[Display] what to display
\item[OutputFcn] the array of output functions
\item[PlotFcns] the array of plot functions

\end{description}


\end{ldescription}
\end{Arguments}
%
\begin{Value}
This function does not return any data, but execute the output function(s).
\end{Value}
%
\begin{Author}\relax
Author of Scilab neldermead module: Michael Baudin (INRIA - Digiteo)

Author of R adaptation: Sebastien Bihorel (\email{sb.pmlab@gmail.com})
\end{Author}
%
\begin{SeeAlso}\relax
\code{\LinkA{fminsearch}{fminsearch}},
\code{\LinkA{neldermead.new}{neldermead.new}},
\code{\LinkA{neldermead.configure}{neldermead.configure}},
\end{SeeAlso}
