a positive integer variable set to the order of R.
the upper triangular matrix R.
(not documented)
a vector of length n which must contain the diagonal elements of the matrix D.
a vector of length n which must contain the first n elements of the vector (Q^T)b.
a positive variable which specifies an upper bound on the Euclidean norm of Dx.
an output vector of length n which contains the desired convex combination of the Gauss-Newton direction and the scaled gradient direction.
work array of length n.
work array of length n.
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^T)b.