TSparseMtx.TripletsToSparseAndFlush Method

procedure TripletsToSparseAndFlush;

Construct a sparse matrix by specifying the position of each element in dense matrix.

Result: stored in self (calling object)

Remarks:

This method can be used to construct a sparse matrix by specifying the position of each element in dense matrix.

Examples
A[1,0] := 1;
A[2,3] := 5;
A[4,0] := 2;
A.TripletsToSparseAndFlush;

If you later call :A.SparseToDense, you'll construct a dense matrix of form:

0 0 0 0
1 0 0 0  <=  1,0
0 0 0 5  <=  2,3
0 0 0 0
2 0 0 0  <=  4,0
See Also: TSparseMtx.AddSplit, TSparseMtx.AddSplit