TSparseMtx::TripletsToSparseAndFlush Method

void TripletsToSparseAndFlush();

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

Remarks:

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

Examples
#include "sparse.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    TSparseMtx* A = new TSparseMtx();
    (*A->Value)(1, 0) = 1;
    (*A->Value)(2, 3) = 5;
    (*A->Value)(4, 0) = 2;
    A->TripletsToSparseAndFlush();
    delete A;
}
See Also: TSparseMtx::AddSplit
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler