MtxExpr::SubScaledC Function

Overload List

#SignatureDescription
1Vector SubScaledC(TVec *X, const double xScale, TMtxVec *Y, const double yScale, const double Z);Compute X*xScale - Y*yScale - zScalar
2Matrix SubScaledC(TMtx *X, const double xScale, TMtxVec *Y, const double yScale, const double Z);Compute X*xScale - Y*yScale - zScalar, when X is a Matrix
3Vector SubScaledC(TVec *X, TMtxVec *Y, const double yScale, const double Z);Compute X - Y*yScale - zScalar
4Matrix SubScaledC(TMtx *X, TMtxVec *Y, const double yScale, const double Z);Compute X - Y*yScale - zScalar, where X is a Matrix
5Vector SubScaledC(TVec *X, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);Compute X - Y*yScale - zScalar
6Matrix SubScaledC(TMtx *X, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);Compute X - Y*yScale - zScalar, where X is a Matrix
7Vector SubScaledC(TVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);Compute X*xScale - Y*yScale - zScalar
8Matrix SubScaledC(TMtx *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);Compute X*xScale - Y*yScale - zScalar, where X is a Matrix

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

Compute X*xScale - Y*yScale - zScalar

#NameTypeDescription
1XTVec *
2xScaleconst double
3YTMtxVec *
4yScaleconst double
5Zconst double
Remarks:

Computes the expression X*xScale - Y*yScale - zScalar 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 xScale = 1.0, yScale = 2.0, zScalar = 3.0;
    Vector X = { 5, 6, 7, 8 };
    Vector Y = { 1, 2, 3, 4 };
    Vector A1 = X * xScale - Y * yScale - zScalar;
    Vector A2 = SubScaledC(X, xScale, Y, yScale, zScalar);
    Vector A3;
    A3.SubScaledC(X, xScale, Y, yScale, zScalar);
    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 SubScaledC(TMtx *X, const double xScale, TMtxVec *Y, const double yScale, const double Z);

Compute X*xScale - Y*yScale - zScalar, when X is a Matrix

#NameTypeDescription
1XTMtx *
2xScaleconst double
3YTMtxVec *
4yScaleconst double
5Zconst double
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler

Overload 3: Vector SubScaledC(TVec *X, TMtxVec *Y, const double yScale, const double Z);

Compute X - Y*yScale - zScalar

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

Computes the result of subtracting Y scaled by yScale and a scalar zScalar from X, without creating 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 yScale = 1.5, zScalar = 3.0;
    Vector X = {5, 6, 7, 8};
    Vector Y = {1, 2, 3, 4};
    Vector A1 = X - Y * yScale - zScalar;
    Vector A2 = SubScaledC(X, Y, yScale, zScalar); // Adjust parameter order if needed.
    Vector A3;
    A3.SubScaledC(X, Y, yScale, zScalar);
    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 4: Matrix SubScaledC(TMtx *X, TMtxVec *Y, const double yScale, const double Z);

Compute X - Y*yScale - zScalar, where X is a Matrix

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

Overload 5: Vector SubScaledC(TVec *X, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);

Compute X - Y*yScale - zScalar

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

Overload 6: Matrix SubScaledC(TMtx *X, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);

Compute X - Y*yScale - zScalar, where X is a Matrix

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

Overload 7: Vector SubScaledC(TVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);

Compute X*xScale - Y*yScale - zScalar

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

Overload 8: Matrix SubScaledC(TMtx *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);

Compute X*xScale - Y*yScale - zScalar, where X is a Matrix

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