123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
- <html>
- <!-- Created on December 10, 2012 by texi2html 1.82
- texi2html was written by:
- Lionel Cons <[email protected]> (original author)
- Karl Berry <[email protected]>
- Olaf Bachmann <[email protected]>
- and many others.
- Maintained by: Many creative people.
- Send bugs and suggestions to <[email protected]>
- -->
- <head>
- <title>avram - a virtual machine code interpreter: D.9.1 kinsol input parameters</title>
- <meta name="description" content="avram - a virtual machine code interpreter: D.9.1 kinsol input parameters">
- <meta name="keywords" content="avram - a virtual machine code interpreter: D.9.1 kinsol input parameters">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="texi2html 1.82">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.smallquotation {font-size: smaller}
- pre.display {font-family: serif}
- pre.format {font-family: serif}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: serif; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: serif; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.roman {font-family:serif; font-weight:normal;}
- span.sansserif {font-family:sans-serif; font-weight:normal;}
- ul.toc {list-style: none}
- -->
- </style>
- </head>
- <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
- <a name="kinsol-input-parameters"></a>
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="kinsol.html#kinsol" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="kinsol-output.html#kinsol-output" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="External-Libraries.html#External-Libraries" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="kinsol.html#kinsol" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Copying.html#Copying" title="Next chapter"> >> </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
- <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
- <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
- <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
- </tr></table>
- <hr size="1">
- <a name="kinsol-input-parameters-1"></a>
- <h3 class="subsection">D.9.1 <code>kinsol</code> input parameters</h3>
- <p>Functions whose names are of the form <code><var>x</var>d_<var>zzzzz</var></code>
- take an argument of the form
- <code>(<var>f</var>,(<var>i</var>,<var>o</var>))</code>,
- and functions whose names are of the form <code><var>x</var>j_<var>zzzzz</var></code>
- take an argument of the form
- <code>((<var>f</var>,<var>j</var>),(<var>i</var>,<var>o</var>))</code>.
- The parameters have these interpretations.
- </p>
- <ul>
- <li>
- <var>f</var> is a function to be optimized, expressed in virtual machine
- code. It takes a list of real numbers as input and returns a list of
- real numbers as output. The numbers must be in floating point format
- as described in <a href="math.html#math"><code>math</code></a>.
- </li><li>
- <var>j</var> is a function in virtual machine code that computes the
- Jacobian or partial derivatives of <var>f</var> for a given list of input
- <a name="index-Jacobian"></a>
- numbers. The exact calling convention for <var>j</var> depends on the
- optimization algorithm selected, as explained below.
- </li><li>
- <var>i</var> is a list of real numbers suitable as an input for <var>f</var>.
- The exact values of the numbers in <var>i</var> are not crucial but the
- length of <var>i</var> is taken as an indication of the required length for
- any input list to <var>f</var>. In the case of constrained optimization
- problems (i.e., functions with names beginning with <code>c</code>), <var>i</var> must
- consist entirely of non-negative numbers.
- </li><li>
- <var>o</var> is a list numbers indicating the “optimal” output from
- <var>f</var> in the sense described below (<a href="kinsol-output.html#kinsol-output"><code>kinsol</code> output</a>). Its length
- is taken to indicate the usual length of an output returned by
- <var>f</var>.
- </li></ul>
- <p>If the optimization problem is being solved by either the
- <code>cj_dense</code> or the <code>uj_dense</code> method, the Jacobian parameter
- <var>j</var> is expected to take a list <var>v</var> of real numbers the length
- of <var>i</var> as input and return a list of lists of reals as output. The
- numbers are represented as described in <a href="math.html#math"><code>math</code></a>. The outer list in
- the output from <var>j</var> is required to be the length of <var>o</var>, while
- each inner list is required to be the length of <var>i</var>.
- </p>
- <p>The output from <var>j</var> is interpreted as a matrix of the form
- described in <a href="Two-dimensional-arrays.html#Two-dimensional-arrays">Two dimensional arrays</a>. The entry in row <var>m</var>
- and column <var>n</var> is the partial derivative (evaluated at <var>v</var>) of
- the <var>m</var>-th component of the output of <var>f</var> with respect to the
- <var>n</var>-th item of the input list.
- </p>
- <p>For optimization problems being solved by the methods of
- <code><var>x</var>j_gmres</code>, <code><var>x</var>j_bicgs</code>, or
- <code><var>x</var>j_tfqmr</code>, (i.e., where <var>x</var> is either <code>c</code> or
- <code>u</code>) the Jacobian function <var>j</var> follows a different convention
- that is meant to be more memory efficient. Given an argument of the
- form <code>(<var>m</var>,<var>v</var>)</code>, it returns only the <var>m</var>-th row of
- the matrix described above instead of the whole thing. The parameter
- <var>m</var> is a natural number less than the length of <var>o</var>, and
- <var>v</var> is a list of real numbers the length of <var>i</var> the same as
- above. The number <var>m</var> is encoded as described in
- <a href="Representation-of-Numeric-and-Textual-Data.html#Representation-of-Numeric-and-Textual-Data">Representation of Numeric and Textual Data</a>.
- </p>
- <hr size="1">
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="kinsol.html#kinsol" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="kinsol-output.html#kinsol-output" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="External-Libraries.html#External-Libraries" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="kinsol.html#kinsol" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Copying.html#Copying" title="Next chapter"> >> </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
- <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
- <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
- <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
- </tr></table>
- <p>
- <font size="-1">
- This document was generated on <i>December 10, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
- </font>
- <br>
- </p>
- </body>
- </html>
|