MtxExpr::DivideElemC Function

Overload List

#SignatureDescription
1Vector DivideElemC(TVec *X, TMtxVec *Y, const double Z);Compute X / (Y*zScale)
2Matrix DivideElemC(TMtx *X, TMtxVec *Y, const double Z);Compute X / (Y*zScale), when X is a Matrix.
3Vector DivideElemC(TVec *X, TMtxVec *Y, const TCplx &Z);Compute X / (Y*zScale)
4Matrix DivideElemC(TMtx *X, TMtxVec *Y, const TCplx &Z);Compute X / (Y*zScale), where X is a Matrix

Overload 1: Vector DivideElemC(TVec *X, TMtxVec *Y, const double Z);

Compute X / (Y*zScale)

#NameTypeDescription
1XTVec *
2YTMtxVec *
3Zconst double
Remarks:

Divides X by (Y multiplied by the scalar zScale) without temporary objects.

Examples
#include "MtxExpr.h"
#include "Units.Math387.h"
#include "Units.MtxExpr.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::Math387;
using namespace Dew::Math::Units::MtxExpr;

void Example()
{
    double zScale = 2.0;
    Vector X = { 10, 20, 30, 40 };
    Vector Y = { 2, 4, 6, 8 };
    Vector A1 = X / (Y * zScale);
    Vector A2 = DivideElemC(X, Y, zScale);
    Vector A3;
    A3.DivideC(X, Y, zScale);
    if (!A2.IsEqual(A1)) ERaise("Problem");
    if (!A3.IsEqual(A1)) ERaise("Problem");
}
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler

Overload 2: Matrix DivideElemC(TMtx *X, TMtxVec *Y, const double Z);

Compute X / (Y*zScale), when X is a Matrix.

#NameTypeDescription
1XTMtx *
2YTMtxVec *
3Zconst double
Remarks:

The operation does only per-element math.

Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler

Overload 3: Vector DivideElemC(TVec *X, TMtxVec *Y, const TCplx &Z);

Compute X / (Y*zScale)

#NameTypeDescription
1XTVec *
2YTMtxVec *
3Zconst TCplx &
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler

Overload 4: Matrix DivideElemC(TMtx *X, TMtxVec *Y, const TCplx &Z);

Compute X / (Y*zScale), where X is a Matrix

#NameTypeDescription
1XTMtx *
2YTMtxVec *
3Zconst TCplx &
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler