573 lines
24 KiB
HTML
573 lines
24 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (version 1.7.0_51) on Wed Apr 06 13:11:04 EDT 2016 -->
|
|
<title>NonLinearLeastSquares (Parallel Java 2 Library Documentation)</title>
|
|
<meta name="date" content="2016-04-06">
|
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="NonLinearLeastSquares (Parallel Java 2 Library Documentation)";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar_top">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/NonLinearLeastSquares.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../edu/rit/numeric/MDMinimizationDownhillSimplex.html" title="class in edu.rit.numeric"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../edu/rit/numeric/NonNegativeLeastSquares.html" title="class in edu.rit.numeric"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?edu/rit/numeric/NonLinearLeastSquares.html" target="_top">Frames</a></li>
|
|
<li><a href="NonLinearLeastSquares.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field_summary">Field</a> | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field_detail">Field</a> | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">edu.rit.numeric</div>
|
|
<h2 title="Class NonLinearLeastSquares" class="title">Class NonLinearLeastSquares</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>edu.rit.numeric.NonLinearLeastSquares</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="strong">NonLinearLeastSquares</span>
|
|
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
|
|
<div class="block">Class NonLinearLeastSquares provides a method for minimizing the sum of the
|
|
squares of a series of nonlinear functions. There are <I>M</I> functions,
|
|
each of which has <I>N</I> inputs. These functions are represented by an
|
|
object that implements interface <a href="../../../edu/rit/numeric/VectorFunction.html" title="interface in edu.rit.numeric">VectorFunction</a>. The
|
|
<TT>solve()</TT> method finds a vector <B>x</B> such that
|
|
Σ<SUB><I>i</I></SUB> [<I>f</I><SUB><I>i</I></SUB>(<B>x</B>)]<SUP>2</SUP>
|
|
is minimized. The inputs to and outputs from the <TT>solve()</TT> method are
|
|
stored in the fields of an instance of class NonLinearLeastSquares. The
|
|
Levenberg-Marquardt method is used to find the solution.
|
|
<P>
|
|
The Java code is a translation of the Fortran subroutine <TT>LMDER</TT> from
|
|
the MINPACK library. MINPACK was developed by Jorge Moré, Burt Garbow,
|
|
and Ken Hillstrom at Argonne National Laboratory. For further information,
|
|
see
|
|
<A HREF="http://www.netlib.org/minpack/" TARGET="_top">http://www.netlib.org/minpack/</A>.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/numeric/VectorFunction.html" title="interface in edu.rit.numeric">VectorFunction</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#fcn">fcn</a></strong></code>
|
|
<div class="block">The nonlinear functions <I>f</I><SUB><I>i</I></SUB>(<B>x</B>) to be
|
|
minimized.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>double[][]</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#fjac">fjac</a></strong></code>
|
|
<div class="block">The <I>M</I>×<I>N</I>-element Jacobian matrix.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>double[]</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#fvec">fvec</a></strong></code>
|
|
<div class="block">The <I>M</I>-element result vector.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#info">info</a></strong></code>
|
|
<div class="block">Information about the outcome.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>int[]</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#ipvt">ipvt</a></strong></code>
|
|
<div class="block">The <I>N</I>-element permutation vector for <TT>fjac</TT>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#M">M</a></strong></code>
|
|
<div class="block">The number of functions.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#N">N</a></strong></code>
|
|
<div class="block">The number of arguments for each function.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#nprint">nprint</a></strong></code>
|
|
<div class="block">Debug printout flag.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>double</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#tol">tol</a></strong></code>
|
|
<div class="block">Tolerance.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>double[]</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#x">x</a></strong></code>
|
|
<div class="block">The <I>N</I>-element <B>x</B> vector for the least squares problem.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#NonLinearLeastSquares(edu.rit.numeric.VectorFunction)">NonLinearLeastSquares</a></strong>(<a href="../../../edu/rit/numeric/VectorFunction.html" title="interface in edu.rit.numeric">VectorFunction</a> theFunction)</code>
|
|
<div class="block">Construct a new nonlinear least squares problem for the given functions.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#solve()">solve</a></strong>()</code>
|
|
<div class="block">Solve this nonlinear least squares minimization problem.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>protected void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/numeric/NonLinearLeastSquares.html#subclassDebug(int)">subclassDebug</a></strong>(int iter)</code>
|
|
<div class="block">Print debugging information.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
|
|
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="fcn">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fcn</h4>
|
|
<pre>public final <a href="../../../edu/rit/numeric/VectorFunction.html" title="interface in edu.rit.numeric">VectorFunction</a> fcn</pre>
|
|
<div class="block">The nonlinear functions <I>f</I><SUB><I>i</I></SUB>(<B>x</B>) to be
|
|
minimized.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="M">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>M</h4>
|
|
<pre>public final int M</pre>
|
|
<div class="block">The number of functions.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="N">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>N</h4>
|
|
<pre>public final int N</pre>
|
|
<div class="block">The number of arguments for each function.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="x">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>x</h4>
|
|
<pre>public final double[] x</pre>
|
|
<div class="block">The <I>N</I>-element <B>x</B> vector for the least squares problem. On
|
|
input to the <TT>solve()</TT> method, <TT>x</TT> contains an initial
|
|
estimate of the solution vector. On output from the <TT>solve()</TT>
|
|
method, <TT>x</TT> contains the final solution vector.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="fvec">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fvec</h4>
|
|
<pre>public final double[] fvec</pre>
|
|
<div class="block">The <I>M</I>-element result vector. On output from the <TT>solve()</TT>
|
|
method, for <I>i</I> = 0 to <I>M</I>−1,
|
|
<TT>fvec</TT><SUB><I>i</I></SUB> = <I>f</I><SUB><I>i</I></SUB>(<B>x</B>),
|
|
where <B>x</B> is the final solution vector.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="fjac">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fjac</h4>
|
|
<pre>public final double[][] fjac</pre>
|
|
<div class="block">The <I>M</I>×<I>N</I>-element Jacobian matrix. On output from the
|
|
<TT>solve()</TT> method, the upper <I>N</I>×<I>N</I> submatrix of
|
|
<TT>fjac</TT> contains an upper triangular matrix <B>R</B> with diagonal
|
|
elements of nonincreasing magnitude such that
|
|
<P>
|
|
<CENTER>
|
|
<B>P</B><SUP>T</SUP> (<B>J</B><SUP>T</SUP> <B>J</B>) <B>P</B> = <B>R</B><SUP>T</SUP> <B>R</B>
|
|
</CENTER>
|
|
<P>
|
|
where <B>P</B> is a permutation matrix and <B>J</B> is the final
|
|
calculated Jacobian. Column <I>j</I> of <B>P</B> is column
|
|
<TT>ipvt[j]</TT> (see below) of the identity matrix. The lower
|
|
trapezoidal part of <TT>fjac</TT> contains information generated during
|
|
the computation of <B>R</B>.
|
|
<P>
|
|
<TT>fjac</TT> is used to calculate the covariance matrix of the solution.
|
|
This calculation is not yet implemented.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="ipvt">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ipvt</h4>
|
|
<pre>public final int[] ipvt</pre>
|
|
<div class="block">The <I>N</I>-element permutation vector for <TT>fjac</TT>. On output from
|
|
the <TT>solve()</TT> method, <TT>ipvt</TT> defines a permutation matrix
|
|
<B>P</B> such that <B>JP</B> = <B>QR</B>, where <B>J</B> is the final
|
|
calculated Jacobian, <B>Q</B> is orthogonal (not stored), and <B>R</B> is
|
|
upper triangular with diagonal elements of nonincreasing magnitude.
|
|
Column <I>j</I> of <B>P</B> is column <TT>ipvt[j]</TT> of the identity
|
|
matrix.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="tol">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>tol</h4>
|
|
<pre>public double tol</pre>
|
|
<div class="block">Tolerance. An input to the <TT>solve()</TT> method. Must be >= 0.
|
|
Termination occurs when the algorithm estimates either that the relative
|
|
error in the sum of squares is at most <TT>tol</TT> or that the relative
|
|
error between <TT>x</TT> and the solution is at most <TT>tol</TT>. The
|
|
default tolerance is 1×10<SUP>−6</SUP>.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="info">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>info</h4>
|
|
<pre>public int info</pre>
|
|
<div class="block">Information about the outcome. An output of the <TT>solve()</TT> method.
|
|
The possible values are:
|
|
<UL>
|
|
<LI>
|
|
0 -- Improper input parameters. Also, an IllegalArgumentException is
|
|
thrown.
|
|
<LI>
|
|
1 -- Algorithm estimates that the relative error in the sum of squares is
|
|
at most <TT>tol</TT>.
|
|
<LI>
|
|
2 -- Algorithm estimates that the relative error between <TT>x</TT> and
|
|
the solution is at most <TT>tol</TT>.
|
|
<LI>
|
|
3 -- Conditions for <TT>info</TT> = 1 and <TT>info</TT> = 2 both hold.
|
|
<LI>
|
|
4 -- <TT>fvec</TT> is orthogonal to the columns of the Jacobian to
|
|
machine precision.
|
|
<LI>
|
|
5 -- Number of function evaluations has reached 100(<I>N</I>+1). Also, a
|
|
TooManyIterationsException is thrown.
|
|
<LI>
|
|
6 -- <TT>tol</TT> is too small. No further reduction in the sum of
|
|
squares is possible.
|
|
<LI>
|
|
7 -- <TT>tol</TT> is too small. No further improvement in the approximate
|
|
solution <TT>x</TT> is possible.
|
|
</UL></div>
|
|
</li>
|
|
</ul>
|
|
<a name="nprint">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>nprint</h4>
|
|
<pre>public int nprint</pre>
|
|
<div class="block">Debug printout flag. An input to the <TT>solve()</TT> method. If
|
|
<TT>nprint</TT> > 0, the <TT>subclassDebug()</TT> method is called at
|
|
the beginning of the first iteration and every <TT>nprint</TT> iterations
|
|
thereafter and immediately prior to return. If <TT>nprint</TT> <= 0,
|
|
the <TT>subclassDebug()</TT> method is not called. The default setting is
|
|
0.</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="NonLinearLeastSquares(edu.rit.numeric.VectorFunction)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>NonLinearLeastSquares</h4>
|
|
<pre>public NonLinearLeastSquares(<a href="../../../edu/rit/numeric/VectorFunction.html" title="interface in edu.rit.numeric">VectorFunction</a> theFunction)</pre>
|
|
<div class="block">Construct a new nonlinear least squares problem for the given functions.
|
|
Field <TT>fcn</TT> is set to <TT>theFunction</TT>. Fields <TT>M</TT> and
|
|
<TT>N</TT> are set by calling the <TT>resultLength()</TT> and
|
|
<TT>argumentLength()</TT> methods of <TT>theFunction</TT>. The vector and
|
|
matrix fields <TT>x</TT>, <TT>fvec</TT>, <TT>fjac</TT>, and <TT>ipvt</TT>
|
|
are allocated with the proper sizes but are not filled in.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theFunction</code> - Nonlinear functions to be minimized.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>theFunction</TT> is null.</dd>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <I>M</I> <= 0, <I>N</I> <= 0,
|
|
or <I>M</I> < <I>N</I>.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="solve()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>solve</h4>
|
|
<pre>public void solve()</pre>
|
|
<div class="block">Solve this nonlinear least squares minimization problem. The
|
|
<TT>solve()</TT> method finds a vector <B>x</B> such that
|
|
Σ<SUB><I>i</I></SUB> [<I>f</I><SUB><I>i</I></SUB>(<B>x</B>)]<SUP>2</SUP>
|
|
is minimized. On input, the field <TT>x</TT> must be filled in with an
|
|
initial estimate of the solution vector, and the field <TT>tol</TT> must
|
|
be set to the desired tolerance. On output, the other fields are filled
|
|
in with the solution as explained in the documentation for each field.</div>
|
|
<dl><dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>tol</TT> <= 0.</dd>
|
|
<dd><code><a href="../../../edu/rit/numeric/TooManyIterationsException.html" title="class in edu.rit.numeric">TooManyIterationsException</a></code> - (unchecked exception) Thrown if too many iterations occurred without
|
|
finding a minimum (100(<I>N</I>+1) iterations).</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="subclassDebug(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>subclassDebug</h4>
|
|
<pre>protected void subclassDebug(int iter)</pre>
|
|
<div class="block">Print debugging information. If the <TT>nprint</TT> field is greater than
|
|
zero, the <TT>subclassDebug()</TT> method is called at the beginning of
|
|
the first iteration and every <TT>nprint</TT> iterations thereafter and
|
|
immediately prior to return. The fields of this object contain the
|
|
current state of the algorithm. The fields of this object must not be
|
|
altered.
|
|
<P>
|
|
The default implementation of the <TT>subclassDebug()</TT> method does
|
|
nothing. A subclass can override the <TT>subclassDebug()</TT> method to
|
|
do something, such as print debugging information.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>iter</code> - Iteration number.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar_bottom">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/NonLinearLeastSquares.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../edu/rit/numeric/MDMinimizationDownhillSimplex.html" title="class in edu.rit.numeric"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../edu/rit/numeric/NonNegativeLeastSquares.html" title="class in edu.rit.numeric"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?edu/rit/numeric/NonLinearLeastSquares.html" target="_top">Frames</a></li>
|
|
<li><a href="NonLinearLeastSquares.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field_summary">Field</a> | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field_detail">Field</a> | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small><FONT SIZE="-2">Copyright © 2013–2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">@</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
|
|
</body>
|
|
</html>
|