.\" .de Id .. .de Sp .if n .sp .if t .sp 0.4 .. .TH diag 4rheolef "rheolef-6.7" "rheolef-6.7" "rheolef-6.7" .\" label: /*Class:diag .SH NAME \fBdiag\fP - get diagonal part of a matrix .\" skip: @clindex dia .\" skip: @clindex vec .\" skip: @clindex csr .\" skip: @cindex diagonal matrix .SH DESCRIPTION This function get the diagonal part of a matrix. .\" begin_example .Sp .nf csr a; dia d = diag(a); .Sp .fi .\" end_example .SH TODO Build a csr matrix from a diagonal one or from a vector: .\" begin_example .Sp .nf dia d; csr a = diag(d); vec u; csr b = diag(u); .Sp .fi .\" end_example .\" END .SH IMPLEMENTATION .\" begin_example .Sp .nf template dia diag (const csr& a) .Sp .fi .\" end_example