📄 zhess.java
字号:
package jmathlib.toolbox.jmathlib.matrix._private.Jampack;
/**
Zhess implements the unitary reduction to Hessenberg form
by a unitary similarity transformation. Specifically, given
a square matrix A, there is a unitary matrix U such that
<pre>
* H = U^H AU
</pre>
is upper Hessenberg.
Zhess represents U and H as Zmats.
@version Pre-alpha
@author G. W. Stewart
*/
public class Zhess{
/** The upper Hessenberg matrix */
public Zmat H;
/** The unitary matrix */
public Zmat U;
/** Creates a Zhess from a square Zmat. Throws a
JampackException for nonsquare matrx.
@param A A Zmat
@return The Hessenberg form of A
@exception JampackException
Thrown if A is not square.
*/
public Zhess(Zmat A)
throws JampackException{
if (A.nr != A.nc){
throw new JampackException
("Matrix not square");
}
H = new Zmat(A);
U = Eye.o(H.nr);
Z1 work = new Z1(H.nr);
for (int k=H.bx; k<=H.cx-2; k++){
Z1 u = House.genc(H, k+1, H.rx, k);
House.ua(u, H, k+1, H.rx, k+1, H.cx, work);
House.au(H, u, H.bx, H.rx, k+1, H.cx, work);
House.au(U, u, U.bx, U.rx, k+1, U.cx, work);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -