TSparseMtx::SparseToTriplets Method

Overload List

#SignatureDescription
1void SparseToTriplets(DewArray<int> &dstRow, DewArray<int> &DstColumn, DewArray<double> &DstValues);Convert sparse matrix to triplets.
2void SparseToTriplets(DewArray<int> &dstRow, DewArray<int> &DstColumn, DewArray<float> &DstValues);
3void SparseToTriplets(DewArray<int> &dstRow, DewArray<int> &DstColumn, DewArray<TCplx> &DstCValues);Convert sparse matrix to triplets (complex version).
4void SparseToTriplets(DewArray<int> &dstRow, DewArray<int> &DstColumn, DewArray<TSCplx> &DstCValues);
5void SparseToTriplets(TMtx *DstTriplets, bool ImInRow = false);Convert sparse matrix to triplets.

Overload 1: void SparseToTriplets(DewArray<int> &dstRow, DewArray<int> &DstColumn, DewArray<double> &DstValues);

Convert sparse matrix to triplets.

#NameTypeDescription
1dstRowDewArray<int> &
2DstColumnDewArray<int> &
3DstValuesDewArray<double> &
Remarks:

A sparse matrix can also be presented as pairs of the three elements called triplets. For each non zero value in the matrix we specify it's position: Row, Column, and it's Value. SparseToTriplets will convert the calling sparse matrix data to the triplets format. The data will be sorted first by columns and then by rows. Triplets can be represented by three arrays: Row, Column and Values or they can all be stored in one TMtx matrix.

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

Overload 2: void SparseToTriplets(DewArray<int> &dstRow, DewArray<int> &DstColumn, DewArray<float> &DstValues);

#NameTypeDescription
1dstRowDewArray<int> &
2DstColumnDewArray<int> &
3DstValuesDewArray<float> &
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler

Overload 3: void SparseToTriplets(DewArray<int> &dstRow, DewArray<int> &DstColumn, DewArray<TCplx> &DstCValues);

Convert sparse matrix to triplets (complex version).

#NameTypeDescription
1dstRowDewArray<int> &
2DstColumnDewArray<int> &
3DstCValuesDewArray<TCplx> &
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler

Overload 4: void SparseToTriplets(DewArray<int> &dstRow, DewArray<int> &DstColumn, DewArray<TSCplx> &DstCValues);

#NameTypeDescription
1dstRowDewArray<int> &
2DstColumnDewArray<int> &
3DstCValuesDewArray<TSCplx> &
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler

Overload 5: void SparseToTriplets(TMtx *DstTriplets, bool ImInRow = false);

Convert sparse matrix to triplets.

#NameTypeDescription
1DstTripletsTMtx *
2ImInRow = falsebool
Remarks:

Triplets are stored in the first three rows of the matrix. First row stores the row indices, the second stores the column indices and the third row stores the matrix values. In case of a complex matrix and if ImInRow is True, the imaginary part's of the complex numbers are stored in the fourth row.

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