TSparseMtx::MulLeft Method

Overload List

#SignatureDescription
1void MulLeft(TMtx *X, TMtx *Y);Multiply the sparse matrix from left.
2void MulLeft(TVec *X, TVec *Y);Multiply sparse matrix from left with vector X and place the result in vector Y.

Overload 1: void MulLeft(TMtx *X, TMtx *Y);

Multiply the sparse matrix from left.

#NameTypeDescription
1XTMtx *
2YTMtx *
Remarks:

Multiply calling sparse matrix from left with dense matrix X and place the result in dense matrix Y.

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

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    Matrix a(3, 2);
    Matrix b(2, 3);
    TSparseMtx* aSparse = new TSparseMtx();
    Matrix s = {{1, 0, 2}, {0, 3, 0}};
    aSparse->DenseToSparse(s);
    aSparse->MulLeft(a, b); // result is stored in b
    delete aSparse;
}
See Also: TSparseMtx::MulRight
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler

Overload 2: void MulLeft(TVec *X, TVec *Y);

Multiply sparse matrix from left with vector X and place the result in vector Y.

#NameTypeDescription
1XTVec *
2YTVec *
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler