Vector::DivAndAdd Method

Overload List

#SignatureDescription
1TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, TMtxVec *Z) const;Compute X/Y + Z
2TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, TMtxVec *Z, int zIndex, int Index, int Len) const;Compute X/Y + Z on sub array
3TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z) const;Compute X/Y*xyScale + Z
4TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z) const;Compute X/Y*xyScale + Z
5TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double xyScale, TMtxVec *Z, int zIndex, int Index, int Len) const;Compute X/Y*xyScale + Z on sub array
6TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &xyScale, TMtxVec *Z, int zIndex, int Index, int Len) const;Compute X/Y*xyScale + Z on sub array
7TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, TMtxVec *Z, const double zScale) const;Compute X/Y + Z*zScale
8TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale) const;Compute X/Y + Z*zScale
9TMtxVec *DivAndAdd(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
10TMtxVec *DivAndAdd(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
11TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const double Z) const;Compute X/Y + zScalar
12TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const TCplx &Z) const;Compute X/Y + zScalar
13TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double Z, int Index, int Len) const;Compute X/Y + zScalar on sub array
14TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &Z, int Index, int Len) const;Compute X/Y + zScalar on sub array
15TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z, const double zScale) const;Compute (X / Y)*xyScale + Z*zScale
16TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double xyScale, TMtxVec *Z, int zIndex, const double zScale, int Index, int Len) const;Compute (X / Y)*xyScale + Z*zScale on sub array
17TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z, const TCplx &zScale) const;Compute (X / Y)*xyScale + Z*zScale
18TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &xyScale, TMtxVec *Z, int zIndex, const TCplx &zScale, int Index, int Len) const;Compute (X / Y)*xyScale + Z*zScale on sub array
19TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const double xyScale, const double Z) const;Compute (X / Y) * xyScale + zScalar
20TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double xyScale, const double Z, int Index, int Len) const;Compute (X / Y) * xyScale + zScalar
21TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const TCplx &xyScale, const TCplx &Z) const;Compute (X / Y) * xyScale + zScalar
22TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &xyScale, const TCplx &Z, int Index, int Len) const;Compute (X / Y) * xyScale + zScalar

Overload 1: TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, TMtxVec *Z) const;

Compute X/Y + Z

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3ZTMtxVec *
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()
{
    Vector X, Y, Z, A1, A2, A3;
    double xyScale, zScale;

    xyScale = 1.5;
    zScale = 2.0;
    X = {8, 10, 12, 14};
    Y = {2, 2, 2, 2};
    Z = {1, 1, 1, 1};
    A1 = (X / Y) * xyScale + Z * zScale;
    A2 = DivAndAdd(X, Y, xyScale, Z, zScale);
    A3.DivAndAdd(X, Y, xyScale, Z, zScale); // then in-place call: A3.DivAndAdd(X, Y, xyScale, 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 *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, TMtxVec *Z, int zIndex, int Index, int Len) const;

Compute X/Y + Z on sub array

#NameTypeDescription
1XTMtxVec *
2XIndexint
3YTMtxVec *
4YIndexint
5ZTMtxVec *
6zIndexint
7Indexint
8Lenint
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()
{
    Vector X, Y, A1, A2, A3;
    double xyScale, zScalar;

    xyScale = 1.5;
    zScalar = 2.0;
    X = {8, 10, 12, 14};
    Y = {2, 2, 2, 2};
    A1 = (X / Y) * xyScale + zScalar;
    A2 = DivAndAdd(X, Y, xyScale, zScalar);
    A3.DivAndAdd(X, Y, xyScale, 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 *DivAndAdd(TMtxVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z) const;

Compute X/Y*xyScale + Z

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3xyScaleconst double
4ZTMtxVec *
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;

    X = {6, 8, 10, 12};
    Y = {2, 2, 2, 2};
    Z = {1, 1, 1, 1};
    A1 = (X / Y) + Z; // standard operation using operators
    A2 = DivAndAdd(X, Y, Z); // using the function
    A3.DivAndAdd(X, Y, Z); // in-place operation on A3
    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 *DivAndAdd(TMtxVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z) const;

Compute X/Y*xyScale + Z

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3xyScaleconst TCplx &
4ZTMtxVec *
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()
{
    Vector X, Y, Z, A1, A2, A3;
    double zScale;

    zScale = 2.0;
    X = {6, 8, 10, 12};
    Y = {2, 2, 2, 2};
    Z = {1, 1, 1, 1};
    A1 = (X / Y) + (Z * zScale);
    A2 = DivAndAdd(X, Y, Z, zScale);
    A3.DivAndAdd(X, Y, 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 5: TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double xyScale, TMtxVec *Z, int zIndex, int Index, int Len) const;

Compute X/Y*xyScale + Z on sub array

#NameTypeDescription
1XTMtxVec *
2XIndexint
3YTMtxVec *
4YIndexint
5xyScaleconst double
6ZTMtxVec *
7zIndexint
8Indexint
9Lenint
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 zScalar;

    zScalar = 2.0;
    X = {6, 8, 10, 12};
    Y = {2, 2, 2, 2};
    A1 = (X / Y) + zScalar; // standard operator use
    A2 = DivAndAdd(X, Y, zScalar); // function call
    A3.DivAndAdd(X, Y, zScalar); // in-place method call
    if (!A2.IsEqual(A1))
        ERaise("Problem");
    if (!A3.IsEqual(A1))
        ERaise("Problem");
}
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler

Overload 6: TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &xyScale, TMtxVec *Z, int zIndex, int Index, int Len) const;

Compute X/Y*xyScale + Z on sub array

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

Overload 7: TMtxVec *DivAndAdd(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 8: TMtxVec *DivAndAdd(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 9: TMtxVec *DivAndAdd(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 10: TMtxVec *DivAndAdd(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 11: TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const double Z) const;

Compute X/Y + zScalar

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

Overload 12: TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const TCplx &Z) const;

Compute X/Y + zScalar

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

Overload 13: TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double Z, int Index, int Len) const;

Compute X/Y + zScalar on sub array

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

Overload 14: TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &Z, int Index, int Len) const;

Compute X/Y + zScalar on sub array

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

Overload 15: TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z, const double zScale) const;

Compute (X / Y)*xyScale + Z*zScale

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3xyScaleconst double
4ZTMtxVec *
5zScaleconst double
Remarks:

The following expression would also run at the same or higher speed, when passing Z also for the Y parameter:

(X / Z) xyScale + Z zScale

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

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

Compute (X / Y)*xyScale + Z*zScale on sub array

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

Overload 17: TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z, const TCplx &zScale) const;

Compute (X / Y)*xyScale + Z*zScale

#NameTypeDescription
1XTMtxVec *
2YTMtxVec *
3xyScaleconst TCplx &
4ZTMtxVec *
5zScaleconst TCplx &
Remarks:

The following expression would also run at the same or higher speed, when passing Z also for the Y parameter:

(X / Z) xyScale + Z zScale

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

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

Compute (X / Y)*xyScale + Z*zScale on sub array

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

Overload 19: TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const double xyScale, const double Z) const;

Compute (X / Y) * xyScale + zScalar

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

Overload 20: TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const double xyScale, const double Z, int Index, int Len) const;

Compute (X / Y) * xyScale + zScalar

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

Overload 21: TMtxVec *DivAndAdd(TMtxVec *X, TMtxVec *Y, const TCplx &xyScale, const TCplx &Z) const;

Compute (X / Y) * xyScale + zScalar

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

Overload 22: TMtxVec *DivAndAdd(TMtxVec *X, int XIndex, TMtxVec *Y, int YIndex, const TCplx &xyScale, const TCplx &Z, int Index, int Len) const;

Compute (X / Y) * xyScale + zScalar

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