TSparseMtx::MulRight Method

Overload List

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

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

Multiply the sparse matrix from right.

#NameTypeDescription
1XTMtx *
2YTMtx *
Remarks:

Multiply calling sparse matrix from right 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->MulRight(a, b); // result is stored in b
    delete aSparse;
}
See Also: TSparseMtx::MulLeft
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler

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

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

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