GCDMatrix

A GCD matrix fills each entry \((i,j)\) (counting from zero) of an \(m \times n\) matrix with the greatest common denominator of \(i+1\) and \(j+1\), i.e.,

\[A(i,j) = \text{gcd}(i+1,j+1).\]

C++ API

void GCDMatrix(Matrix<T> &G, Int m, Int n)
void GCDMatrix(AbstractDistMatrix<T> &G, Int m, Int n)

C API

ElError ElGCDMatrix_i(ElMatrix_i G, ElInt m, ElInt n)
ElError ElGCDMatrix_s(ElMatrix_s G, ElInt m, ElInt n)
ElError ElGCDMatrix_d(ElMatrix_d G, ElInt m, ElInt n)
ElError ElGCDMatrix_c(ElMatrix_c G, ElInt m, ElInt n)
ElError ElGCDMatrix_z(ElMatrix_z G, ElInt m, ElInt n)
ElError ElGCDMatrixDist_i(ElDistMatrix_i G, ElInt m, ElInt n)
ElError ElGCDMatrixDist_s(ElDistMatrix_s G, ElInt m, ElInt n)
ElError ElGCDMatrixDist_d(ElDistMatrix_d G, ElInt m, ElInt n)
ElError ElGCDMatrixDist_c(ElDistMatrix_c G, ElInt m, ElInt n)
ElError ElGCDMatrixDist_z(ElDistMatrix_z G, ElInt m, ElInt n)

Python API

GCDMatrix(G, m, n)