TSparseMtx.Resize Method

function Resize(Len: Integer; ZeroIt: Boolean): TMtxVec;

Resizes the sparse matrix to a new number of non-zeros.

#NameTypeDescription
1LenIntegerelement count
2ZeroItBoolean

Result: stored in self (calling object), returns self for chaining

Remarks:

Resizes the sparse matrix to a new number of non-zeros. The existing values are preserved up to the new size. This includes the sparsity pattern arrays Ai and Ap. This resize does not change the number of Columns of the sparse matrix, but only the number of non-zeros that can be stored in the matrix.

Examples
var a: Tvec;
begin
    CreateIt(a);
    try
        a.SetIt(false,[1,2,3]);
        a.Resize(7,True); // a= [1,2,3,0,0,0,0]
    finally
        FreeIt(a);
    end;
end;