kinsol-input-parameters.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
  2. <html>
  3. <!-- Created on November 8, 2012 by texi2html 1.82
  4. texi2html was written by:
  5. Lionel Cons <[email protected]> (original author)
  6. Karl Berry <[email protected]>
  7. Olaf Bachmann <[email protected]>
  8. and many others.
  9. Maintained by: Many creative people.
  10. Send bugs and suggestions to <[email protected]>
  11. -->
  12. <head>
  13. <title>avram - a virtual machine code interpreter: D.9.1 kinsol input parameters</title>
  14. <meta name="description" content="avram - a virtual machine code interpreter: D.9.1 kinsol input parameters">
  15. <meta name="keywords" content="avram - a virtual machine code interpreter: D.9.1 kinsol input parameters">
  16. <meta name="resource-type" content="document">
  17. <meta name="distribution" content="global">
  18. <meta name="Generator" content="texi2html 1.82">
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <style type="text/css">
  21. <!--
  22. a.summary-letter {text-decoration: none}
  23. blockquote.smallquotation {font-size: smaller}
  24. pre.display {font-family: serif}
  25. pre.format {font-family: serif}
  26. pre.menu-comment {font-family: serif}
  27. pre.menu-preformatted {font-family: serif}
  28. pre.smalldisplay {font-family: serif; font-size: smaller}
  29. pre.smallexample {font-size: smaller}
  30. pre.smallformat {font-family: serif; font-size: smaller}
  31. pre.smalllisp {font-size: smaller}
  32. span.roman {font-family:serif; font-weight:normal;}
  33. span.sansserif {font-family:sans-serif; font-weight:normal;}
  34. ul.toc {list-style: none}
  35. -->
  36. </style>
  37. </head>
  38. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  39. <a name="kinsol-input-parameters"></a>
  40. <table cellpadding="1" cellspacing="1" border="0">
  41. <tr><td valign="middle" align="left">[<a href="kinsol.html#kinsol" title="Previous section in reading order"> &lt; </a>]</td>
  42. <td valign="middle" align="left">[<a href="kinsol-output.html#kinsol-output" title="Next section in reading order"> &gt; </a>]</td>
  43. <td valign="middle" align="left"> &nbsp; </td>
  44. <td valign="middle" align="left">[<a href="External-Libraries.html#External-Libraries" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
  45. <td valign="middle" align="left">[<a href="kinsol.html#kinsol" title="Up section"> Up </a>]</td>
  46. <td valign="middle" align="left">[<a href="Copying.html#Copying" title="Next chapter"> &gt;&gt; </a>]</td>
  47. <td valign="middle" align="left"> &nbsp; </td>
  48. <td valign="middle" align="left"> &nbsp; </td>
  49. <td valign="middle" align="left"> &nbsp; </td>
  50. <td valign="middle" align="left"> &nbsp; </td>
  51. <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
  52. <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
  53. <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
  54. <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
  55. </tr></table>
  56. <hr size="1">
  57. <a name="kinsol-input-parameters-1"></a>
  58. <h3 class="subsection">D.9.1 <code>kinsol</code> input parameters</h3>
  59. <p>Functions whose names are of the form <code><var>x</var>d_<var>zzzzz</var></code>
  60. take an argument of the form
  61. <code>(<var>f</var>,(<var>i</var>,<var>o</var>))</code>,
  62. and functions whose names are of the form <code><var>x</var>j_<var>zzzzz</var></code>
  63. take an argument of the form
  64. <code>((<var>f</var>,<var>j</var>),(<var>i</var>,<var>o</var>))</code>.
  65. The parameters have these interpretations.
  66. </p>
  67. <ul>
  68. <li>
  69. <var>f</var> is a function to be optimized, expressed in virtual machine
  70. code. It takes a list of real numbers as input and returns a list of
  71. real numbers as output. The numbers must be in floating point format
  72. as described in <a href="math.html#math"><code>math</code></a>.
  73. </li><li>
  74. <var>j</var> is a function in virtual machine code that computes the
  75. Jacobian or partial derivatives of <var>f</var> for a given list of input
  76. <a name="index-Jacobian"></a>
  77. numbers. The exact calling convention for <var>j</var> depends on the
  78. optimization algorithm selected, as explained below.
  79. </li><li>
  80. <var>i</var> is a list of real numbers suitable as an input for <var>f</var>.
  81. The exact values of the numbers in <var>i</var> are not crucial but the
  82. length of <var>i</var> is taken as an indication of the required length for
  83. any input list to <var>f</var>. In the case of constrained optimization
  84. problems (i.e., functions with names beginning with <code>c</code>), <var>i</var> must
  85. consist entirely of non-negative numbers.
  86. </li><li>
  87. <var>o</var> is a list numbers indicating the &ldquo;optimal&rdquo; output from
  88. <var>f</var> in the sense described below (<a href="kinsol-output.html#kinsol-output"><code>kinsol</code> output</a>). Its length
  89. is taken to indicate the usual length of an output returned by
  90. <var>f</var>.
  91. </li></ul>
  92. <p>If the optimization problem is being solved by either the
  93. <code>cj_dense</code> or the <code>uj_dense</code> method, the Jacobian parameter
  94. <var>j</var> is expected to take a list <var>v</var> of real numbers the length
  95. of <var>i</var> as input and return a list of lists of reals as output. The
  96. numbers are represented as described in <a href="math.html#math"><code>math</code></a>. The outer list in
  97. the output from <var>j</var> is required to be the length of <var>o</var>, while
  98. each inner list is required to be the length of <var>i</var>.
  99. </p>
  100. <p>The output from <var>j</var> is interpreted as a matrix of the form
  101. described in <a href="Two-dimensional-arrays.html#Two-dimensional-arrays">Two dimensional arrays</a>. The entry in row <var>m</var>
  102. and column <var>n</var> is the partial derivative (evaluated at <var>v</var>) of
  103. the <var>m</var>-th component of the output of <var>f</var> with respect to the
  104. <var>n</var>-th item of the input list.
  105. </p>
  106. <p>For optimization problems being solved by the methods of
  107. <code><var>x</var>j_gmres</code>, <code><var>x</var>j_bicgs</code>, or
  108. <code><var>x</var>j_tfqmr</code>, (i.e., where <var>x</var> is either <code>c</code> or
  109. <code>u</code>) the Jacobian function <var>j</var> follows a different convention
  110. that is meant to be more memory efficient. Given an argument of the
  111. form <code>(<var>m</var>,<var>v</var>)</code>, it returns only the <var>m</var>-th row of
  112. the matrix described above instead of the whole thing. The parameter
  113. <var>m</var> is a natural number less than the length of <var>o</var>, and
  114. <var>v</var> is a list of real numbers the length of <var>i</var> the same as
  115. above. The number <var>m</var> is encoded as described in
  116. <a href="Representation-of-Numeric-and-Textual-Data.html#Representation-of-Numeric-and-Textual-Data">Representation of Numeric and Textual Data</a>.
  117. </p>
  118. <hr size="1">
  119. <table cellpadding="1" cellspacing="1" border="0">
  120. <tr><td valign="middle" align="left">[<a href="kinsol.html#kinsol" title="Previous section in reading order"> &lt; </a>]</td>
  121. <td valign="middle" align="left">[<a href="kinsol-output.html#kinsol-output" title="Next section in reading order"> &gt; </a>]</td>
  122. <td valign="middle" align="left"> &nbsp; </td>
  123. <td valign="middle" align="left">[<a href="External-Libraries.html#External-Libraries" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
  124. <td valign="middle" align="left">[<a href="kinsol.html#kinsol" title="Up section"> Up </a>]</td>
  125. <td valign="middle" align="left">[<a href="Copying.html#Copying" title="Next chapter"> &gt;&gt; </a>]</td>
  126. <td valign="middle" align="left"> &nbsp; </td>
  127. <td valign="middle" align="left"> &nbsp; </td>
  128. <td valign="middle" align="left"> &nbsp; </td>
  129. <td valign="middle" align="left"> &nbsp; </td>
  130. <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
  131. <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
  132. <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
  133. <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
  134. </tr></table>
  135. <p>
  136. <font size="-1">
  137. This document was generated on <i>November 8, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
  138. </font>
  139. <br>
  140. </p>
  141. </body>
  142. </html>