BA-GMRES iterative solver
x=splspc_gmresba(A, b) x=splspc_gmresba(A, b, restart) x=splspc_gmresba(A, b, restart, maxiter) x=splspc_gmresba(A, b, restart, maxiter, tol) [x, nbiter]= splsc_gmresba(...) [x, nbiter, res]= splsc_gmresba(...) [x, nbiter, res, result]= splsc_gmresba(...) [x, nbiter, res, result, itertime]= splsc_gmresba(...)
sparse matrix (size m x n) : the matrix A in the least square problem min(b-Ax)
matrix of double (size m x 1) : the vector b in the least square problem min(b-Ax)
matrix of integer (size 1 x 1) : the number of iterations before restarting the algorithm (default = min(m,n))
matrix of integer (size 1 x 1) : the maximum number of iterations in the algorithm (default = min(m,n))
matrix of integer (size 1 x 1) : the threshold of tolerance for stopping the algorithm (default = 1.e-6)
matrix of double (size n x 1) : solution vector x in the least square problem min(b-Ax)
matrix of integer (size 1 x 1) : total number of necessary iterations to find the solution vector
matrix of double (size 1 x 1) : norm of the computed residual r=A^(T)b-A^(T)Ax
matrix of integer (size 1 x 1) : 0 if the solution is reached, 1 otherwise
matrix of double (size 1 x 1) : computation time for the iterative method
This function solves the sparse linear least squares problem min |Ax-b|, with the BA-GMRES method.
Any optional argument equal to the empty matrix [] is replaced by its default value.
The GMRES method consist in solving the least square problem min(b-Ax), for A square matrix. But when A is not square, GMRES can't be directly used and need to be slightly modified.
Any optional argument equal to the empty matrix [] is replaced by its default value.
The BA-GMRES method consist in solving the least square problem min(Bb-BAx), ie finding x such as the norm of Bb-BAx is minimal. This method is mainly useful for overdetermined problems, ie m > n for A of size m x n, because the matrix obtained by doing the product of B and A is of size n x n.
Used without a given preconditioner, the method is simply applied with B=A^(T).
Restart can be used to save memory but is not adviced in this case. The initial vector x0 for the iterative process has been set up to a vector of zeros.
path = fullfile(splspc_getpath(),"tests","matrices"); filename=fullfile(path,"illc1033.mtx"); A = mmread(filename); b=ones(size(A,1),1); // With default settings x=splspc_gmresba(A,b); norm(A*x-b)/norm(b) // Configure the options restart=1000; max_iter=3000; tol=1.e-6; [x,nbiter,resid,result,itertime]=splspc_gmresba(A,b,restart,max_iter,tol); // Configure only max_iter x=splspc_gmresba(A,b,[],max_iter); | ![]() | ![]() |
1994 - 2008 - Sparselib++ v1.7 - R. Pozo, K. Remington, and A. Lumsdaine
2010 - National Institute of Informatics - K. Hayami, T. Ito and J.-F. Yin
2011 - DIGITEO - Michael Baudin
2011 - National Institute of Informatics - Benoit Goepfert