Calculate Q, alpha and beta for Lanzos approximation
Usage
lanczos(Hq, q, k, x = attr(Hq, "env")$x0, orthogonalize = FALSE, tol = 1e-12)Arguments
- Hq
function that calculates the product
H %*% qgiven probeqand parametersx- q
initial vector used for defining a Kyrlov subspace
- k
dimension for Kyrlov subspace
- x
parameter vector used when calculating the Hessian matrix
- orthogonalize
Whether to do two-pass Gram-Schmidt re-normalization (much slower)
- tol
numerical tolerance for stopping algorithm given that no more terms are identifiable