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

Description Usage Arguments Value Examples

View source: R/thomas.tri.sol.R

Description

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

Usage

1
thomas.tri.sol(Q, v, z)

Arguments

Q

The given tridiagonal matrix.

v

The column vector on the right hand of equation.

z

The Rayleigh shift.

Value

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

Examples

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

PowerfulMaxEigenpair documentation built on Jan. 7, 2020, 5:06 p.m.