CGLS#
- class cuqi.solver.CGLS(A, b, x0, maxit, tol=1e-06, shift=0)#
Conjugate Gradient method for unsymmetric linear equations and least squares problems.
See http://web.stanford.edu/group/SOL/software/cgls/ for the matlab version it is based on.
If SHIFT is 0, then CGLS is Hestenes and Stiefel’s conjugate-gradient method for least-squares problems. If SHIFT is nonzero, the system (A’*A + SHIFT*I)*X = A’*b is solved.
Solve Ax=b or minimize ||Ax-b||^2 or solve (A^TA+sI)x=A^Tb.
- Parameters:
A (ndarray or callable f(x,*args).)
b (ndarray.)
x0 (ndarray. Initial guess.)
maxit (The maximum number of iterations.)
tol (The numerical tolerance for convergence checks.)
shift (The shift parameter (s) shown above.)
- __init__(A, b, x0, maxit, tol=1e-06, shift=0)#
Methods