Finds the minimizing combination of Gauss-Newton and gradient steps.
Given an M by N matrix A, an N by N nonsingular diagonal
matrix D, an M-vector B, and a positive number DELTA, the
problem is to determine the convex combination X of the
Gauss-Newton and scaled gradient directions that minimizes
(AX - B) in the least squares sense, subject to the
restriction that the euclidean norm of DX be at most DELTA.
This function completes the solution of the problem
if it is provided with the necessary information from the
QR factorization of A. That is, if A = QR, where Q has
orthogonal columns and R is an upper triangular matrix,
then DOGLEG expects the full upper triangle of R and
the first N components of Q'B.
Arguments
Type
Intent
Optional
Attributes
Name
integer
::
n
In - order of the matrix R
real(kind=dp)
::
r(lr)
In - upper triangular matrix R stored by rows.
integer
::
lr
In - size of the R array, which must be no less than (N*(N+1))/2.
real(kind=dp)
::
diag(n)
In - diagonal elements of the matrix D.
real(kind=dp)
::
qtb(n)
In - first N elements of the vector Q'* B.
real(kind=dp)
::
delta
In - positive upper bound on the euclidean norm of D*X(1:N).
real(kind=dp)
::
x(n)
Out - desired convex combination of the Gauss-Newton
direction and the scaled gradient direction.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.