Get diagonal part of a matrix
This function get the diagonal part of a matrix.
csr<Float> a; dia<Float> d = diag(a);
Build a csr matrix from a diagonal one or from a vector:
dia<Float> d; csr<Float> a = diag(d); vec<Float> u; csr<Float> b = diag(u);
template<class T, class M> dia<T,M> diag (const csr<T,M>& a)