Diagonal¶
An \(n \times n\) matrix \(A\) is called diagonal if each entry \((i,j)\), where \(i \neq j\), is \(0\). They are therefore defined by the diagonal values, where \(i = j\).
The following routines construct a diagonal matrix from the vector of diagonal values, \(d\).
C++ API¶
- 
void Diagonal(Matrix<S> &D, const std::vector<T> &d)¶
- 
void Diagonal(AbstractDistMatrix<S> &D, const std::vector<T> &d)¶
- 
void Diagonal(AbstractBlockDistMatrix<S> &D, const std::vector<T> &d)¶
C API¶
- 
ElError ElDiagonal_c(ElMatrix_c A, ElInt dSize, complex_float* dBuf)¶
- 
ElError ElDiagonal_z(ElMatrix_z A, ElInt dSize, complex_double* dBuf)¶
- 
ElError ElDiagonalDist_c(ElDistMatrix_c A, ElInt dSize, complex_float* dBuf)¶
- 
ElError ElDiagonalDist_z(ElDistMatrix_z A, ElInt dSize, complex_double* dBuf)¶
