L-BFGS-B  3.0
Large-scale Bound-constrained Optimization
cmprlb.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cmprlb (n, m, x, g, ws, wy, sy, wt, z, r, wa, index, theta, col, head, nfree, cnstnd)
 This subroutine computes r=-Z'B(xcp-xk)-Z'g by using wa(2m+1)=W'(xcp-x) from subroutine cauchy. More...
 

Function/Subroutine Documentation

◆ cmprlb()

subroutine cmprlb ( integer  n,
integer  m,
double precision, dimension(n)  x,
double precision, dimension(n)  g,
double precision, dimension(n, m)  ws,
double precision, dimension(n, m)  wy,
double precision, dimension(m, m)  sy,
double precision, dimension(m, m)  wt,
double precision, dimension(n)  z,
double precision, dimension(n)  r,
double precision, dimension(4*m)  wa,
integer, dimension(n)  index,
double precision  theta,
integer  col,
integer  head,
integer  nfree,
logical  cnstnd 
)

This subroutine computes r=-Z'B(xcp-xk)-Z'g by using wa(2m+1)=W'(xcp-x) from subroutine cauchy.

Parameters
nnumber of parameters
mhistory size of Hessian approximation
xposition
ggradient
wspart of L-BFGS matrix
wypart of L-BFGS matrix
sypart of L-BFGS matrix
wtpart of L-BFGS matrix
zThe generalized Cauchy point xcp computed by cauchy. Used here as the linearisation point: r encodes -B(z-x) - g restricted to the free variables.
rOn exit r(1:nfree) contains -theta*(z(k)-x(k)) - g(k) plus the W*M^{-1}*W' correction, where k = index(i). Caller uses this as the residual for the subspace minimisation problem. When cnstnd=.false. and col>0, the shortcut path sets r(1:n) = -g(:) without using the index array.
waLength-4m workspace shared with cauchy. On entry, the segment wa(2m+1 : 2m+2col) holds W'(z-x) (filled by cauchy). On exit wa(1 : 2col) holds M^{-1}*W'(z-x) from the bmv call.
indexPermutation of (1..n): index(1..nfree) lists the indices of variables that are free at the GCP and are the active optimisation variables here.
thetaScaling factor specifying the initial Hessian B_0 = theta*I.
colNumber of stored (s,y) correction pairs (0 on the first iteration; up to m thereafter).
headIndex in the cyclic WS/WY buffer of the oldest stored correction. Used to walk the columns in chronological order.
nfreeNumber of free variables; size of the subspace problem.
cnstnd.true. if the problem has bounds; controls the shortcut path described under
r.Historical note: this routine used to take an info output parameter to forward errors from the embedded bmv call. Since bmv cannot fail under LAPACK dtrsm, the parameter was always 0 on exit and has been removed.

Definition at line 44 of file cmprlb.f.

References bmv().

Referenced by mainlb().

Here is the call graph for this function:
Here is the caller graph for this function: