Description Usage Arguments Value See Also Examples
Calculate the maximal eigenpair for the general matrix.
1 2 | eff.ini.maxeig.general(A, v0_tilde = NULL, z0 = NULL, z0numeric, xi = 1,
digit.thresh = 6)
|
A |
The input general matrix. |
v0_tilde |
The unnormalized initial vector \tilde{v0}. |
z0 |
The type of initial z_0 used to calculate the approximation of ρ(Q). There are three types: 'fixed', 'Auto' and 'numeric' corresponding to three choices of z_0 in paper. |
z0numeric |
The numerical value assigned to initial z_0 as an approximation of ρ(Q) when z_0='numeric'. |
xi |
The coefficient used to form the convex combination of δ_1^{-1} and (v_0,-Q*v_0)_μ, it should between 0 and 1. |
digit.thresh |
The precise level of output results. |
A list of eigenpair object are returned, with components z, v and iter.
z |
The approximating sequence of the maximal eigenvalue. |
v |
The approximating eigenfunction of the corresponding eigenvector. |
iter |
The number of iterations. |
eff.ini.maxeig.tri
for the tridiagonal matrix maximal
eigenpair by rayleigh quotient iteration algorithm.
eff.ini.maxeig.shift.inv.tri
for the tridiagonal matrix
maximal eigenpair by shifted inverse iteration algorithm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | A = matrix(c(1, 1, 3, 2, 2, 2, 3, 1, 1), 3, 3)
eff.ini.maxeig.general(A, v0_tilde = rep(1, dim(A)[1]), z0 = 'fixed')
A = matrix(c(1, 1, 3, 2, 2, 2, 3, 1, 1), 3, 3)
eff.ini.maxeig.general(A, v0_tilde = rep(1, dim(A)[1]), z0 = 'Auto')
##Symmetrizing A converge to second largest eigenvalue
A = matrix(c(1, 3, 9, 5, 2, 14, 10, 6, 0, 11, 11, 7, 0, 0, 1, 8), 4, 4)
S = (t(A) + A)/2
N = dim(S)[1]
a = diag(S[-1, -N])
b = diag(S[-N, -1])
c = rep(NA, N)
c[1] = -diag(S)[1] - b[1]
c[2:(N - 1)] = -diag(S)[2:(N - 1)] - b[2:(N - 1)] - a[1:(N - 2)]
c[N] = -diag(S)[N] - a[N - 1]
z0ini = eff.ini.maxeig.tri(a, b, c, xi = 7/8)$z[1]
eff.ini.maxeig.general(A, v0_tilde = rep(1, dim(A)[1]), z0 = 'numeric',
z0numeric = 28 - z0ini)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.