% -*- texinfo -*- % @deftypefn {Function File} {[@var{u}, @var{h}, @var{nu}] =} krylov (@var{a}, @var{v}, @var{k}, @var{eps1}, @var{pflg}) % Construct an orthogonal basis @var{u} of block Krylov subspace % % @example % [v a*v a^2*v @dots{} a^(k+1)*v] % @end example % % @noindent % Using Householder reflections to guard against loss of orthogonality. % % If @var{v} is a vector, then @var{h} contains the Hessenberg matrix % such that @code{a*u == u*h+rk*ek'}, in which @code{rk = % a*u(:,k)-u*h(:,k)}, and @code{ek'} is the vector % @code{[0, 0, @dots{}, 1]} of length @code{k}. Otherwise, @var{h} is % meaningless. % % If @var{v} is a vector and @var{k} is greater than % @code{length(A)-1}, then @var{h} contains the Hessenberg matrix such % that @code{a*u == u*h}. % % The value of @var{nu} is the dimension of the span of the krylov % subspace (based on @var{eps1}). % % If @var{b} is a vector and @var{k} is greater than @var{m-1}, then % @var{h} contains the Hessenberg decomposition of @var{a}. % % The optional parameter @var{eps1} is the threshold for zero. The % default value is 1e-12. % % If the optional parameter @var{pflg} is nonzero, row pivoting is used % to improve numerical behavior. The default value is 0. % % Reference: Hodel and Misra, 'Partial Pivoting in the Computation of % Krylov Subspaces', to be submitted to Linear Algebra and its % Applications % @end deftypefn