File: MD03BY.html

package info (click to toggle)
slicot 5.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,528 kB
  • sloc: fortran: 148,076; makefile: 964; sh: 57
file content (217 lines) | stat: -rw-r--r-- 7,702 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<HTML>
<HEAD><TITLE>MD03BY - SLICOT Library Routine Documentation</TITLE>
</HEAD>
<BODY>

<H2><A Name="MD03BY">MD03BY</A></H2>
<H3>
Levenberg-Marquardt parameter for a standard nonlinear least squares problem
</H3>
<A HREF ="#Specification"><B>[Specification]</B></A>
<A HREF ="#Arguments"><B>[Arguments]</B></A>
<A HREF ="#Method"><B>[Method]</B></A>
<A HREF ="#References"><B>[References]</B></A>
<A HREF ="#Comments"><B>[Comments]</B></A>
<A HREF ="#Example"><B>[Example]</B></A>

<P>
<B><FONT SIZE="+1">Purpose</FONT></B>
<PRE>
  To determine a value for the parameter PAR such that if x solves
  the system

        A*x = b ,     sqrt(PAR)*D*x = 0 ,

  in the least squares sense, where A is an m-by-n matrix, D is an
  n-by-n nonsingular diagonal matrix, and b is an m-vector, and if
  DELTA is a positive number, DXNORM is the Euclidean norm of D*x,
  then either PAR is zero and

        ( DXNORM - DELTA ) .LE. 0.1*DELTA ,

  or PAR is positive and

        ABS( DXNORM - DELTA ) .LE. 0.1*DELTA .

  It is assumed that a QR factorization, with column pivoting, of A
  is available, that is, A*P = Q*R, where P is a permutation matrix,
  Q has orthogonal columns, and R is an upper triangular matrix
  with diagonal elements of nonincreasing magnitude.
  The routine needs the full upper triangle of R, the permutation
  matrix P, and the first n components of Q'*b (' denotes the
  transpose). On output, MD03BY also provides an upper triangular
  matrix S such that

        P'*(A'*A + PAR*D*D)*P = S'*S .

  Matrix S is used in the solution process.

</PRE>
<A name="Specification"><B><FONT SIZE="+1">Specification</FONT></B></A>
<PRE>
      SUBROUTINE MD03BY( COND, N, R, LDR, IPVT, DIAG, QTB, DELTA, PAR,
     $                   RANK, X, RX, TOL, DWORK, LDWORK, INFO )
C     .. Scalar Arguments ..
      CHARACTER         COND
      INTEGER           INFO, LDR, LDWORK, N, RANK
      DOUBLE PRECISION  DELTA, PAR, TOL
C     .. Array Arguments ..
      INTEGER           IPVT(*)
      DOUBLE PRECISION  DIAG(*), DWORK(*), QTB(*), R(LDR,*), RX(*), X(*)

</PRE>
<A name="Arguments"><B><FONT SIZE="+1">Arguments</FONT></B></A>
<P>

<B>Mode Parameters</B>
<PRE>
  COND    CHARACTER*1
          Specifies whether the condition of the matrices R and S
          should be estimated, as follows:
          = 'E' :  use incremental condition estimation for R and S;
          = 'N' :  do not use condition estimation, but check the
                   diagonal entries of R and S for zero values;
          = 'U' :  use the rank already stored in RANK (for R).

</PRE>
<B>Input/Output Parameters</B>
<PRE>
  N       (input) INTEGER
          The order of the matrix R.  N &gt;= 0.

  R       (input/output) DOUBLE PRECISION array, dimension (LDR, N)
          On entry, the leading N-by-N upper triangular part of this
          array must contain the upper triangular matrix R.
          On exit, the full upper triangle is unaltered, and the
          strict lower triangle contains the strict upper triangle
          (transposed) of the upper triangular matrix S.

  LDR     INTEGER
          The leading dimension of array R.  LDR &gt;= MAX(1,N).

  IPVT    (input) INTEGER array, dimension (N)
          This array must define the permutation matrix P such that
          A*P = Q*R. Column j of P is column IPVT(j) of the identity
          matrix.

  DIAG    (input) DOUBLE PRECISION array, dimension (N)
          This array must contain the diagonal elements of the
          matrix D.  DIAG(I) &lt;&gt; 0, I = 1,...,N.

  QTB     (input) DOUBLE PRECISION array, dimension (N)
          This array must contain the first n elements of the
          vector Q'*b.

  DELTA   (input) DOUBLE PRECISION
          An upper bound on the Euclidean norm of D*x.  DELTA &gt; 0.

  PAR     (input/output) DOUBLE PRECISION
          On entry, PAR must contain an initial estimate of the
          Levenberg-Marquardt parameter.  PAR &gt;= 0.
          On exit, it contains the final estimate of this parameter.

  RANK    (input or output) INTEGER
          On entry, if COND = 'U', this parameter must contain the
          (numerical) rank of the matrix R.
          On exit, this parameter contains the numerical rank of
          the matrix S.

  X       (output) DOUBLE PRECISION array, dimension (N)
          This array contains the least squares solution of the
          system A*x = b, sqrt(PAR)*D*x = 0.

  RX      (output) DOUBLE PRECISION array, dimension (N)
          This array contains the matrix-vector product -R*P'*x.

</PRE>
<B>Tolerances</B>
<PRE>
  TOL     DOUBLE PRECISION
          If COND = 'E', the tolerance to be used for finding the
          rank of the matrices R and S. If the user sets TOL &gt; 0,
          then the given value of TOL is used as a lower bound for
          the reciprocal condition number;  a (sub)matrix whose
          estimated condition number is less than 1/TOL is
          considered to be of full rank.  If the user sets TOL &lt;= 0,
          then an implicitly computed, default tolerance, defined by
          TOLDEF = N*EPS,  is used instead, where EPS is the machine
          precision (see LAPACK Library routine DLAMCH).
          This parameter is not relevant if COND = 'U' or 'N'.

</PRE>
<B>Workspace</B>
<PRE>
  DWORK   DOUBLE PRECISION array, dimension (LDWORK)
          On exit, the first N elements of this array contain the
          diagonal elements of the upper triangular matrix S.

  LDWORK  INTEGER
          The length of the array DWORK.
          LDWORK &gt;= 4*N, if COND =  'E';
          LDWORK &gt;= 2*N, if COND &lt;&gt; 'E'.

</PRE>
<B>Error Indicator</B>
<PRE>
  INFO    INTEGER
          = 0:  successful exit;
          &lt; 0:  if INFO = -i, the i-th argument had an illegal
                value.

</PRE>
<A name="Method"><B><FONT SIZE="+1">Method</FONT></B></A>
<PRE>
  The algorithm computes the Gauss-Newton direction. A least squares
  solution is found if the Jacobian is rank deficient. If the Gauss-
  Newton direction is not acceptable, then an iterative algorithm
  obtains improved lower and upper bounds for the parameter PAR.
  Only a few iterations are generally needed for convergence of the
  algorithm. If, however, the limit of ITMAX = 10 iterations is
  reached, then the output PAR will contain the best value obtained
  so far. If the Gauss-Newton step is acceptable, it is stored in x,
  and PAR is set to zero, hence S = R.

</PRE>
<A name="References"><B><FONT SIZE="+1">References</FONT></B></A>
<PRE>
  [1] More, J.J., Garbow, B.S, and Hillstrom, K.E.
      User's Guide for MINPACK-1.
      Applied Math. Division, Argonne National Laboratory, Argonne,
      Illinois, Report ANL-80-74, 1980.

</PRE>
<A name="Numerical Aspects"><B><FONT SIZE="+1">Numerical Aspects</FONT></B></A>
<PRE>                            2
  The algorithm requires 0(N ) operations and is backward stable.

</PRE>
<A name="Comments"><B><FONT SIZE="+1">Further Comments</FONT></B></A>
<PRE>
  This routine is a LAPACK-based modification of LMPAR from the
  MINPACK package [1], and with optional condition estimation.
  The option COND = 'U' is useful when dealing with several
  right-hand side vectors, but RANK should be reset.
  If COND = 'E', but the matrix S is guaranteed to be nonsingular
  and well conditioned relative to TOL, i.e., rank(R) = N, and
  min(DIAG) &gt; 0, then its condition is not estimated.

</PRE>

<A name="Example"><B><FONT SIZE="+1">Example</FONT></B></A>
<P>
<B>Program Text</B>
<PRE>
  None
</PRE>
<B>Program Data</B>
<PRE>
  None
</PRE>
<B>Program Results</B>
<PRE>
  None
</PRE>

<HR>
<A HREF=support.html><B>Return to Supporting Routines index</B></A></BODY>
</HTML>