Gear

An \(n \times n\) Gear matrix with integer parameters \(s,t \neq 0\) is a modification of the tridiagonal matrix with a main diagonal of zeros and sub and superdiagonals of ones such that entries \((0,|s|-1)\) and \((n-1,n-|t|)\) are respectively set to \(\text{sgn}(s)\) and \(\text{sgn}(t)\).

C++ API

void Gear(Matrix<T> &G, Int n, Int s, Int t)
void Gear(AbstractDistMatrix<T> &G, Int n, Int s, Int t)

C API

ElError ElGear_i(ElMatrix_i G, ElInt n, ElInt s, ElInt t)
ElError ElGear_s(ElMatrix_s G, ElInt n, ElInt s, ElInt t)
ElError ElGear_d(ElMatrix_d G, ElInt n, ElInt s, ElInt t)
ElError ElGear_c(ElMatrix_c G, ElInt n, ElInt s, ElInt t)
ElError ElGear_z(ElMatrix_z G, ElInt n, ElInt s, ElInt t)
ElError ElGearDist_i(ElDistMatrix_i G, ElInt n, ElInt s, ElInt t)
ElError ElGearDist_s(ElDistMatrix_s G, ElInt n, ElInt s, ElInt t)
ElError ElGearDist_d(ElDistMatrix_d G, ElInt n, ElInt s, ElInt t)
ElError ElGearDist_c(ElDistMatrix_c G, ElInt n, ElInt s, ElInt t)
ElError ElGearDist_z(ElDistMatrix_z G, ElInt n, ElInt s, ElInt t)

Python API

Gear(G, n, s, t)