tri.sol: Solve the linear equation (-Q-zI)w=v.

Description Usage Arguments Value Examples

Description

Construct the solution of linear equation (-Q-zI)w=v.

Usage

1
tri.sol(Q, z, v)

Arguments

Q

The given tridiagonal matrix.

z

The Rayleigh shift.

v

The column vector on the right hand of equation.

Value

A solution sequence w to the equation (-Q-zI)w=v.

Examples

1
2
3
4
5
6
7
8
a = c(1:7)^2
b = c(1:7)^2
c = rep(0, length(a) + 1)
c[length(a) + 1] = 8^2
N = length(a)
zstart = 6
Q = tridiag(b, a, -c(b[1] + c[1], a[1:N - 1] + b[2:N] + c[2:N], a[N] + c[N + 1]))
tri.sol(Q, z=zstart, v=rep(1,dim(Q)[1]))

EfficientMaxEigenpair documentation built on May 2, 2019, 2:17 a.m.