Kahan¶
For any pair \((\phi,\zeta)\) such that \(|\phi|^2+|\zeta|^2=1\), the corresponding \(n \times n\) Kahan matrix is given by:
\[\begin{split}K = \text{diag}(1,\phi,\ldots,\phi^{n-1}) \begin{pmatrix}
1 & -\zeta & -\zeta & \cdots & -\zeta \\
0 & 1 & -\zeta & \cdots & -\zeta \\
& \ddots & & \vdots & \vdots \\
\vdots & & & 1 & -\zeta \\
0 & & \cdots & & 1 \end{pmatrix}\end{split}\]
C++ API¶
-
void
Kahan
(AbstractDistMatrix<F> &A, Int n, F phi)¶ Sets the matrix
A
equal to the \(n \times n\) Kahan matrix with the specified value for \(\phi\).
C API¶
-
ElError
ElKahan_c
(ElMatrix_c A, ElInt n, complex_float phi)¶
-
ElError
ElKahan_z
(ElMatrix_z A, ElInt n, complex_double phi)¶
-
ElError
ElKahanDist_c
(ElDistMatrix_c A, ElInt n, complex_float phi)¶
-
ElError
ElKahanDist_z
(ElDistMatrix_z A, ElInt n, complex_double phi)¶