MtxExpr::DivAndAdd Function

Overload List

#SignatureDescription
1Vector DivAndAdd(TVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z, const double zScale);Compute (X / Y)*xyScale + Z*zScale
2Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const double xyScale, TMtxVec *Z, const double zScale);Compute (X / Y)*xyScale + Z*zScale, where X is a Matrix.
3Vector DivAndAdd(TVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z, const TCplx &zScale);Compute (X / Y)*xyScale + Z*zScale.
4Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z, const TCplx &zScale);Compute (X / Y)*xyScale + Z*zScale, where X is a Matrix.
5Vector DivAndAdd(TVec *X, TMtxVec *Y, const double xyScale, const double Z);Compute (X / Y)*xyScale + zScalar
6Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const double xyScale, const double Z);Compute (X / Y)*xyScale + zScalar, where X is a Matrix
7Vector DivAndAdd(TVec *X, TMtxVec *Y, const TCplx &xyScale, const TCplx &Z);Compute (X / Y)*xyScale + zScalar
8Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const TCplx &xyScale, const TCplx &Z);Compute (X / Y)*xyScale + zScalar, where X is a Matrix
9Vector DivAndAdd(TVec *X, TMtxVec *Y, TMtxVec *Z);Compute X/Y + Z
10Matrix DivAndAdd(TMtx *X, TMtxVec *Y, TMtxVec *Z);Compute X/Y + Z, where X is a Matrix
11Vector DivAndAdd(TVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z);Compute X/Y*xyScale + Z
12Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const double xyScale, TMtxVec *Z);
13Vector DivAndAdd(TVec *X, TMtxVec *Y, TMtxVec *Z, const double zScale);Compute X/Y + Z*zScale
14Matrix DivAndAdd(TMtx *X, TMtxVec *Y, TMtxVec *Z, const double zScale);Compute X/Y + Z*zScale, where X is a Matrix
15Vector DivAndAdd(TVec *X, TMtxVec *Y, const double Z);Compute X/Y + zScalar
16Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const double Z);Compute X/Y + zScalar, where X is a Matrix
17Vector DivAndAdd(TVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z);Compute X/Y*xyScale + Z
18Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z);Compute X/Y*xyScale + Z, where X is a Matrix
19Vector DivAndAdd(TVec *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale);Compute X/Y + Z*zScale
20Matrix DivAndAdd(TMtx *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale);Compute X/Y + Z*zScale, where X is a Matrix
21Vector DivAndAdd(TVec *X, TMtxVec *Y, const TCplx &Z);Compute X/Y + zScalar
22Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const TCplx &Z);Compute X/Y + zScalar, where X is a Matrix

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

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

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

Computes the expression (X divided by Y) multiplied by xyScale plus Z multiplied by zScale, 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 xyScale = 1.5, zScale = 2.0;
    Vector X = {8, 10, 12, 14};
    Vector Y = {2, 2, 2, 2};
    Vector Z = {1, 1, 1, 1};
    Vector A1 = (X / Y) * xyScale + Z * zScale;
    Vector A2 = DivAndAdd(X, Y, xyScale, Z, zScale);
    Vector A3;
    A3.DivAndAdd(X, Y, xyScale, Z, 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 DivAndAdd(TMtx *X, TMtxVec *Y, const double xyScale, TMtxVec *Z, const double zScale);

Compute (X / Y)*xyScale + Z*zScale, where X is a Matrix.

#NameTypeDescription
1XTMtx *
2YTMtxVec *
3xyScaleconst double
4ZTMtxVec *
5zScaleconst 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 DivAndAdd(TVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z, const TCplx &zScale);

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

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

The operation does only per-element math.

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

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

Compute (X / Y)*xyScale + Z*zScale, where X is a Matrix.

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

The operation does only per-element math.

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

Overload 5: Vector DivAndAdd(TVec *X, TMtxVec *Y, const double xyScale, const double Z);

Compute (X / Y)*xyScale + zScalar

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

Computes the expression (X divided by Y) multiplied by xyScale plus a scalar zScalar, 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 xyScale = 1.5, zScalar = 2.0;
    Vector X = {8, 10, 12, 14};
    Vector Y = {2, 2, 2, 2};
    Vector A1 = (X / Y) * xyScale + zScalar;
    Vector A2 = DivAndAdd(X, Y, xyScale, zScalar);
    Vector A3;
    A3.DivAndAdd(X, Y, xyScale, 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 6: Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const double xyScale, const double Z);

Compute (X / Y)*xyScale + zScalar, where X is a Matrix

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

The operation does only per-element math.

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

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

Compute (X / Y)*xyScale + zScalar

#NameTypeDescription
1XTVec *
2YTMtxVec *
3xyScaleconst TCplx &
4Zconst TCplx &
Remarks:

The operation does only per-element math.

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

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

Compute (X / Y)*xyScale + zScalar, where X is a Matrix

#NameTypeDescription
1XTMtx *
2YTMtxVec *
3xyScaleconst TCplx &
4Zconst TCplx &
Remarks:

The operation does only per-element math.

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

Overload 9: Vector DivAndAdd(TVec *X, TMtxVec *Y, TMtxVec *Z);

Compute X/Y + Z

#NameTypeDescription
1XTVec *
2YTMtxVec *
3ZTMtxVec *
Remarks:

Divides X by Y element-wise and then adds Z, all 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()
{
    Vector X = { 6, 8, 10, 12 };
    Vector Y = { 2, 2, 2, 2 };
    Vector Z = { 1, 1, 1, 1 };
    Vector A1 = (X / Y) + Z;             // standard operation using operators
    Vector A2 = DivAndAdd(X, Y, Z);       // using the function
    Vector A3;
    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::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler

Overload 10: Matrix DivAndAdd(TMtx *X, TMtxVec *Y, TMtxVec *Z);

Compute X/Y + Z, where X is a Matrix

#NameTypeDescription
1XTMtx *
2YTMtxVec *
3ZTMtxVec *
Remarks:

The operation does only per-element math.

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

Overload 11: Vector DivAndAdd(TVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z);

Compute X/Y*xyScale + Z

#NameTypeDescription
1XTVec *
2YTMtxVec *
3xyScaleconst double
4ZTMtxVec *
Remarks:

Divides X by Y element-wise, multiplies the result by xyScale, and then adds Z, 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()
{
    Vector X, Y, Z, A1, A2, A3;
    double xyScale;

    xyScale = 1.5;
    X = {8, 10, 12, 14};
    Y = {2, 2, 2, 2};
    Z = {1, 1, 1, 1};
    A1 = (X / Y) * xyScale + Z;
    A2 = DivAndAdd(X, Y, xyScale, Z);
    A3.DivAndAdd(X, Y, xyScale, Z); // or via an in-place method: A3.DivAndAdd(X, Y, xyScale, Z);
    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 12: Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const double xyScale, TMtxVec *Z);

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

Overload 13: Vector DivAndAdd(TVec *X, TMtxVec *Y, TMtxVec *Z, const double zScale);

Compute X/Y + Z*zScale

#NameTypeDescription
1XTVec *
2YTMtxVec *
3ZTMtxVec *
4zScaleconst double
Remarks:

Divides X by Y element-wise, then adds Z multiplied by zScale, all 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 zScale = 2.0;
    Vector X = {6, 8, 10, 12};
    Vector Y = {2, 2, 2, 2};
    Vector Z = {1, 1, 1, 1};
    Vector A1 = (X / Y) + (Z * zScale);
    Vector A2 = DivAndAdd(X, Y, Z, zScale);
    Vector A3;
    A3.DivAndAdd(X, Y, Z, 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 14: Matrix DivAndAdd(TMtx *X, TMtxVec *Y, TMtxVec *Z, const double zScale);

Compute X/Y + Z*zScale, where X is a Matrix

#NameTypeDescription
1XTMtx *
2YTMtxVec *
3ZTMtxVec *
4zScaleconst double
Remarks:

The operation does only per-element math.

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

Overload 15: Vector DivAndAdd(TVec *X, TMtxVec *Y, const double Z);

Compute X/Y + zScalar

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

Divides X by Y element-wise and then adds the scalar zScalar, all 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 zScalar = 2.0;
    Vector X = { 6, 8, 10, 12 };
    Vector Y = { 2, 2, 2, 2 };
    Vector A1 = (X / Y) + zScalar;             // standard operator use
    Vector A2 = DivAndAdd(X, Y, zScalar);       // function call
    Vector A3;
    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::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler

Overload 16: Matrix DivAndAdd(TMtx *X, TMtxVec *Y, const double Z);

Compute X/Y + zScalar, where 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 17: Vector DivAndAdd(TVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z);

Compute X/Y*xyScale + Z

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

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

Compute X/Y*xyScale + Z, where X is a Matrix

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

Overload 19: Vector DivAndAdd(TVec *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale);

Compute X/Y + Z*zScale

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

Overload 20: Matrix DivAndAdd(TMtx *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale);

Compute X/Y + Z*zScale, where X is a Matrix

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

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

Compute X/Y + zScalar

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

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

Compute X/Y + zScalar, where X is a Matrix

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