TSparseMtx::Diag Method

void Diag(TVec *Vec, int kk = 0);

Copies the kk-th diagonal of TSparseMtx to the Vec object.

#NameTypeDescription
1VecTVec *
2kk = 0int
Remarks:

Copies the kk-th diagonal of TSparseMtx to the Vec object. If k = 0 then the main diagonal matrix is obtained, if k < 0 then the k-th subdiagonal matrix is obtained and if k > 0 the then the k-th super diagonal is copied to Vec. The Vec parameters size is set automatically.

Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler