Note: the dimension of the array
a
must be at least
$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\times \left({\mathbf{n}}+1\right)/2\right)$.
On entry: the matrix to be printed. Note that
a must have space for the diagonal elements of the matrix, even if these are not stored.
More precisely,
- if ${\mathbf{uplo}}=\text{'U'}$, the upper triangle of $A$ must be stored with element ${A}_{ij}$ in ${\mathbf{a}}\left(i+j\left(j-1\right)/2\right)$ for $i\le j$;
- if ${\mathbf{uplo}}=\text{'L'}$, the lower triangle of $A$ must be stored with element ${A}_{ij}$ in ${\mathbf{a}}\left(i+\left(2n-j\right)\left(j-1\right)/2\right)$ for $i\ge j$.
If ${\mathbf{diag}}=\text{'U'}$, the diagonal elements of $A$ are assumed to be $1$, and are not referenced; the same storage scheme is used whether ${\mathbf{diag}}=\text{'N'}$ or ‘U’.