Compute
aa = dd \ a * ddin whichaais a matrix whose row and column norms are roughly equal in magnitude, anddd=p * d, in whichpis a permutation matrix anddis 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*ddandbb = cc*b*dd), in whichaaandbbhave non-zero elements of approximately the same magnitude andccandddare permuted diagonal matrices as inddfor the algebraic eigenvalue problem.The eigenvalue balancing option
optmay 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).