Compute
aa = dd \ a * dd
in whichaa
is a matrix whose row and column norms are roughly equal in magnitude, anddd
=p * d
, in whichp
is a permutation matrix andd
is a diagonal matrix of powers of two. This allows the equilibration to be computed without roundoff. Results of eigenvalue calculation are typically improved by balancing first.If four output values are requested, compute
aa = cc*a*dd
andbb = cc*b*dd)
, in whichaa
andbb
have non-zero elements of approximately the same magnitude andcc
anddd
are permuted diagonal matrices as indd
for the algebraic eigenvalue problem.The eigenvalue balancing option
opt
may be one of:
"N"
,"n"
- No balancing; arguments copied, transformation(s) set to identity.
"P"
,"p"
- Permute argument(s) to isolate eigenvalues where possible.
"S"
,"s"
- Scale to improve accuracy of computed eigenvalues.
"B"
,"b"
- Permute and scale, in that order. Rows/columns of a (and b) that are isolated by permutation are not scaled. This is the default behavior.
Algebraic eigenvalue balancing uses standard Lapack routines.
Generalized eigenvalue problem balancing uses Ward's algorithm (SIAM Journal on Scientific and Statistical Computing, 1981).