Vector::SubScaled Method

Overload List

#SignatureDescription
1TMtxVec *SubScaled(TMtxVec *X, TMtxVec *Y, const double yScale, TMtxVec *Z, const double zScale) const;Compute X - Y*yScale - Z*zScale
2TMtxVec *SubScaled(TMtxVec *X, TMtxVec *Y, const TCplx &yScale, TMtxVec *Z, const TCplx &zScale) const;Compute X - Y*yScale - Z*zScale
3TMtxVec *SubScaled(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double yScale, TMtxVec *Z, int zIndex, const double zScale, int Index, int Len) const;Compute X - Y*yScale - Z*zScale on sub array
4TMtxVec *SubScaled(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &yScale, TMtxVec *Z, int zIndex, const TCplx &zScale, int Index, int Len) const;Compute X - Y*yScale - Z*zScale on sub array
5TMtxVec *SubScaled(TMtxVec *X, TMtxVec *Y, TMtxVec *Z, const double zScale) const;Compute X - Y - Z*zScale
6TMtxVec *SubScaled(TMtxVec *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale) const;Compute X - Y - Z*zScale
7TMtxVec *SubScaled(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, TMtxVec *Z, int zIndex, const double zScale, int Index, int Len) const;Compute X - Y - Z*zScale on sub array
8TMtxVec *SubScaled(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, TMtxVec *Z, int zIndex, const TCplx &zScale, int Index, int Len) const;Compute X - Y - Z*zScale on sub array
9TMtxVec *SubScaled(TMtxVec *X, const double xScale, TMtxVec *Y, const double yScale, TMtxVec *Z, const double zScale) const;Compute X*xScale - Y*yScale - Z*zScale
10TMtxVec *SubScaled(TMtxVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, TMtxVec *Z, const TCplx &zScale) const;Compute X*xScale - Y*yScale - Z*zScale
11TMtxVec *SubScaled(TMtxVec *X, int XIndex, const double xScale, TMtxVec *Y, int YIndex, const double yScale, TMtxVec *Z, int zIndex, const double zScale, int Index, int Len) const;Compute X*xScale - Y*yScale - Z*zScale on sub array
12TMtxVec *SubScaled(TMtxVec *X, int XIndex, const TCplx &xScale, TMtxVec *Y, int YIndex, const TCplx &yScale, TMtxVec *Z, int zIndex, const TCplx &zScale, int Index, int Len) const;Compute X*xScale - Y*yScale - Z*zScale on sub array

Overload 1: TMtxVec *SubScaled(TMtxVec *X, TMtxVec *Y, const double yScale, TMtxVec *Z, const double zScale) const;

Compute X - Y*yScale - Z*zScale

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3yScaleconst double
4ZTMtxVec *
5zScaleconst double
Examples
#include "MtxExpr.h"
#include "Units.Math387.h"
#include "Units.MtxExpr.h"
#include "Units.MtxVec.h"

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

void Example()
{
    Vector X, Y, Z, A1, A2, A3;
    double xScale, yScale, zScale;

    xScale = 1.0;
    yScale = 2.0;
    zScale = 3.0;
    X = {5, 6, 7, 8};
    Y = {1, 2, 3, 4};
    Z = {1, 1, 1, 1};
    A1 = X * xScale - Y * yScale - Z * zScale;
    A2 = SubScaled(X, xScale, Y, yScale, Z, zScale);
    A3.SubScaled(X, xScale, Y, yScale, Z, zScale);
    if (!A2.IsEqual(A1))
        ERaise("Problem");
    if (!A3.IsEqual(A1))
        ERaise("Problem");
}
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 2: TMtxVec *SubScaled(TMtxVec *X, TMtxVec *Y, const TCplx &yScale, TMtxVec *Z, const TCplx &zScale) const;

Compute X - Y*yScale - Z*zScale

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3yScaleconst TCplx &
4ZTMtxVec *
5zScaleconst TCplx &
Examples
#include "MtxExpr.h"
#include "Units.Math387.h"
#include "Units.MtxExpr.h"
#include "Units.MtxVec.h"

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

void Example()
{
    Vector X, Y, Z, A1, A2, A3;
    double yScale, zScale;

    yScale = 1.5;
    zScale = 2.0;
    X = {5, 6, 7, 8};
    Y = {1, 2, 3, 4};
    Z = {1, 1, 1, 1};
    A1 = X - Y * yScale - Z * zScale;
    A2 = SubScaled(X, Y, yScale, Z, zScale);
    A3.SubScaled(X, Y, yScale, Z, zScale);
    if (!A2.IsEqual(A1))
        ERaise("Problem");
    if (!A3.IsEqual(A1))
        ERaise("Problem");
}
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 3: TMtxVec *SubScaled(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double yScale, TMtxVec *Z, int zIndex, const double zScale, int Index, int Len) const;

Compute X - Y*yScale - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec *
2XIndexint
3YTMtxVec *
4YIndexint
5yScaleconst double
6ZTMtxVec *
7zIndexint
8zScaleconst double
9Indexint
10Lenint
Examples
#include "MtxExpr.h"
#include "Units.Math387.h"
#include "Units.MtxExpr.h"
#include "Units.MtxVec.h"

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

void Example()
{
    Vector X, Y, Z, A1, A2, A3;
    double zScale;

    zScale = 2.0;
    X = {5, 6, 7, 8};
    Y = {1, 2, 3, 4};
    Z = {1, 1, 1, 1};
    A1 = X - Y - Z * zScale;
    A2 = SubScaled(X, Y, Z, zScale);
    A3.Sub(X, Y, Z * zScale); // Alternatively, a dedicated overload can be used.
    if (!A2.IsEqual(A1))
        ERaise("Problem");
    if (!A3.IsEqual(A1))
        ERaise("Problem");
}
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 4: TMtxVec *SubScaled(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &yScale, TMtxVec *Z, int zIndex, const TCplx &zScale, int Index, int Len) const;

Compute X - Y*yScale - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec *
2XIndexint
3YTMtxVec *
4YIndexint
5yScaleconst TCplx &
6ZTMtxVec *
7zIndexint
8zScaleconst TCplx &
9Indexint
10Lenint
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 5: TMtxVec *SubScaled(TMtxVec *X, TMtxVec *Y, TMtxVec *Z, const double zScale) const;

Compute X - Y - Z*zScale

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3ZTMtxVec *
4zScaleconst double
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 6: TMtxVec *SubScaled(TMtxVec *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale) const;

Compute X - Y - Z*zScale

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3ZTMtxVec *
4zScaleconst TCplx &
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 7: TMtxVec *SubScaled(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, TMtxVec *Z, int zIndex, const double zScale, int Index, int Len) const;

Compute X - Y - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec *
2XIndexint
3YTMtxVec *
4YIndexint
5ZTMtxVec *
6zIndexint
7zScaleconst double
8Indexint
9Lenint
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 8: TMtxVec *SubScaled(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, TMtxVec *Z, int zIndex, const TCplx &zScale, int Index, int Len) const;

Compute X - Y - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec *
2XIndexint
3YTMtxVec *
4YIndexint
5ZTMtxVec *
6zIndexint
7zScaleconst TCplx &
8Indexint
9Lenint
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 9: TMtxVec *SubScaled(TMtxVec *X, const double xScale, TMtxVec *Y, const double yScale, TMtxVec *Z, const double zScale) const;

Compute X*xScale - Y*yScale - Z*zScale

#NameTypeDescription
1XTMtxVec *
2xScaleconst double
3YTMtxVec *
4yScaleconst double
5ZTMtxVec *
6zScaleconst double
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 10: TMtxVec *SubScaled(TMtxVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, TMtxVec *Z, const TCplx &zScale) const;

Compute X*xScale - Y*yScale - Z*zScale

#NameTypeDescription
1XTMtxVec *
2xScaleconst TCplx &
3YTMtxVec *
4yScaleconst TCplx &
5ZTMtxVec *
6zScaleconst TCplx &
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 11: TMtxVec *SubScaled(TMtxVec *X, int XIndex, const double xScale, TMtxVec *Y, int YIndex, const double yScale, TMtxVec *Z, int zIndex, const double zScale, int Index, int Len) const;

Compute X*xScale - Y*yScale - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec *
2XIndexint
3xScaleconst double
4YTMtxVec *
5YIndexint
6yScaleconst double
7ZTMtxVec *
8zIndexint
9zScaleconst double
10Indexint
11Lenint
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 12: TMtxVec *SubScaled(TMtxVec *X, int XIndex, const TCplx &xScale, TMtxVec *Y, int YIndex, const TCplx &yScale, TMtxVec *Z, int zIndex, const TCplx &zScale, int Index, int Len) const;

Compute X*xScale - Y*yScale - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec *
2XIndexint
3xScaleconst TCplx &
4YTMtxVec *
5YIndexint
6yScaleconst TCplx &
7ZTMtxVec *
8zIndexint
9zScaleconst TCplx &
10Indexint
11Lenint
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler