TSparseMtx::PixelDownSample Method

void PixelDownSample(TMtx *Dst, int Pixels = 500, TPixelDownSample mode = TPixelDownSample::pdsPattern);

Reduces dense matrix for screen display (bitmap) to show the non-zero pattern.

#NameTypeDescription
1DstTMtx *
2Pixels = 500int
3mode = TPixelDownSample::pdsPatternTPixelDownSample
Remarks:

Creates a reduced size Dst dense matrix for screen display (bitmap) to show the non-zero pattern. Pixels parameter defines the target number of pixels to reduce TSparseMtx::Rows and TSparseMtx::Cols to. The Mode parameter defines how reduced matrix will be constructed.

Examples
#include "MtxExpr.h"
#include "sparse.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    Vector v1(0);
    Vector v2(0);
    Matrix A(0, 0);
    TSparseMtx* SparseA = new TSparseMtx();
    // ...
    SparseA->Size(7500, 4000, 4000, false);
    SparseA->RandomSparse(v1, v2);
    SparseA->PixelDownSample(A);
    delete SparseA;
}
See Also: TPixelDownSample
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler