UpdateDiagonal

Note

This is not a standard BLAS routine.

Adds a given value to the diagonal of a matrix.

C++ API

void UpdateDiagonal(Matrix<T> &A, T alpha, Int offset = 0)
void UpdateDiagonal(AbstractDistMatrix<T> &A, T alpha, Int offset = 0)

C API

ElError ElUpdateDiagonal_i(ElMatrix_i A, ElInt alpha, ElInt offset)
ElError ElUpdateDiagonal_s(ElMatrix_s A, float alpha, ElInt offset)
ElError ElUpdateDiagonal_d(ElMatrix_d A, double alpha, ElInt offset)
ElError ElUpdateDiagonal_c(ElMatrix_c A, complex_float alpha, ElInt offset)
ElError ElUpdateDiagonal_z(ElMatrix_z A, complex_double alpha, ElInt offset)
ElError ElUpdateDiagonalDist_i(ElDistMatrix_i A, ElInt alpha, ElInt offset)
ElError ElUpdateDiagonalDist_s(ElDistMatrix_s A, float alpha, ElInt offset)
ElError ElUpdateDiagonalDist_d(ElDistMatrix_d A, double alpha, ElInt offset)
ElError ElUpdateDiagonalDist_c(ElDistMatrix_c A, complex_float alpha, ElInt offset)
ElError ElUpdateDiagonalDist_z(ElDistMatrix_z A, complex_double alpha, ElInt offset)

Python API

UpdateDiagonal(A, alpha, offset=0)