Vector::AddScaledC Method

Overload List

#SignatureDescription
1TMtxVec *AddScaledC(TMtxVec *X, TMtxVec *Y, const double yScale, const double Z) const;Compute X + Y*yScale + zScalar
2TMtxVec *AddScaledC(TMtxVec *X, TMtxVec *Y, const TCplx &yScale, const TCplx &Z) const;Compute X + Y*yScale + zScalar
3TMtxVec *AddScaledC(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double yScale, const double Z, int Index, int Len) const;Compute X + Y*yScale + zScalar on sub arrays
4TMtxVec *AddScaledC(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &yScale, const TCplx &Z, int Index, int Len) const;Compute X + Y*yScale + zScalar on sub arrays
5TMtxVec *AddScaledC(TMtxVec *X, const double xScale, TMtxVec *Y, const double yScale, const double Z) const;Compute X*xScale + Y*yScale + zScalar
6TMtxVec *AddScaledC(TMtxVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, const TCplx &Z) const;Compute X*xScale + Y*yScale + zScalar
7TMtxVec *AddScaledC(TMtxVec *X, int XIndex, const double xScale, TMtxVec *Y, int YIndex, const double yScale, const double Z, int Index, int Len) const;Compute X*xScale + Y*yScale + z on sub arrays
8TMtxVec *AddScaledC(TMtxVec *X, int XIndex, const TCplx &xScale, TMtxVec *Y, int YIndex, const TCplx &yScale, const TCplx &Z, int Index, int Len) const;Compute X*xScale + Y*yScale + z on sub arrays

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

Compute X + Y*yScale + zScalar

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3yScaleconst double
4Zconst 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, A1, A2, A3;
    double xScale, yScale, zScalar;

    xScale = 1.0;
    yScale = 2.0;
    zScalar = 3.0;
    X = {1, 2, 3, 4};
    Y = {2, 3, 4, 5};
    A1 = X * xScale + Y * yScale + zScalar;
    A2 = AddScaledC(X, xScale, Y, yScale, zScalar);
    A3.AddScaledC(X, xScale, Y, yScale, zScalar);
    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 *AddScaledC(TMtxVec *X, TMtxVec *Y, const TCplx &yScale, const TCplx &Z) const;

Compute X + Y*yScale + zScalar

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3yScaleconst TCplx &
4Zconst 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, A1, A2, A3;
    double yScale, zScalar;

    yScale = 1.5;
    zScalar = 3.0;
    X = {1, 2, 3, 4};
    Y = {2, 3, 4, 5};
    A1 = X + Y * yScale + zScalar;
    A2 = AddScaledC(X, Y, yScale, zScalar);
    A3.AddScaledC(X, Y, yScale, zScalar);
    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 *AddScaledC(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double yScale, const double Z, int Index, int Len) const;

Compute X + Y*yScale + zScalar on sub arrays

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

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

Compute X + Y*yScale + zScalar on sub arrays

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

Overload 5: TMtxVec *AddScaledC(TMtxVec *X, const double xScale, TMtxVec *Y, const double yScale, const double Z) const;

Compute X*xScale + Y*yScale + zScalar

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

Overload 6: TMtxVec *AddScaledC(TMtxVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, const TCplx &Z) const;

Compute X*xScale + Y*yScale + zScalar

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

Overload 7: TMtxVec *AddScaledC(TMtxVec *X, int XIndex, const double xScale, TMtxVec *Y, int YIndex, const double yScale, const double Z, int Index, int Len) const;

Compute X*xScale + Y*yScale + z on sub arrays

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

Overload 8: TMtxVec *AddScaledC(TMtxVec *X, int XIndex, const TCplx &xScale, TMtxVec *Y, int YIndex, const TCplx &yScale, const TCplx &Z, int Index, int Len) const;

Compute X*xScale + Y*yScale + z on sub arrays

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