Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Vector MulAndDiv(TVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z); | Compute X * Y * xyScale / Z |
| 2 | Matrix MulAndDiv(TMtx *X, TMtxVec *Y, const double xyScale, TMtxVec *Z); | Compute X * Y * xyScale / Z, when X is a Matrix. |
| 3 | Vector MulAndDiv(TVec *X, TMtxVec *Y, const double Z); | Compute X * Y / zScalar |
| 4 | Matrix MulAndDiv(TMtx *X, TMtxVec *Y, const double Z); | Compute X * Y / zScalar, when X is a Matrix. |
| 5 | Vector MulAndDiv(TVec *X, TMtxVec *Y, TMtxVec *Z); | Compute X * Y / Z |
| 6 | Matrix MulAndDiv(TMtx *X, TMtxVec *Y, TMtxVec *Z); | Compute X * Y / Z, where X is a Matrix |
| 7 | Vector MulAndDiv(TVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z); | Compute X * Y * xyScale / Z |
| 8 | Matrix MulAndDiv(TMtx *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z); | Compute X * Y * xyScale / Z, where X is a Matrix |
| 9 | Vector MulAndDiv(TVec *X, TMtxVec *Y, const TCplx &Z); | Compute X * Y / zScalar |
| 10 | Matrix MulAndDiv(TMtx *X, TMtxVec *Y, const TCplx &Z); | Compute X * Y / zScalar, where X is a Matrix |
Overload 1: Vector MulAndDiv(TVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z);
Compute X Y xyScale / Z
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | xyScale | const double | |
| 4 | Z | TMtxVec * |
Remarks:
Computes the product of X and Y scaled by xyScale, then divided by Z, 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 xyScale = 1.5;
Vector X = { 2, 4, 6, 8 };
Vector Y = { 1, 1, 1, 1 };
Vector Z = { 2, 2, 2, 2 };
Vector A1 = (X * Y * xyScale) / Z;
Vector A2 = MulAndDiv(X, Y, xyScale, Z);
Vector A3;
A3.MulAndDiv(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 2: Matrix MulAndDiv(TMtx *X, TMtxVec *Y, const double xyScale, TMtxVec *Z);
Compute X Y xyScale / Z, when X is a Matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | xyScale | const double | |
| 4 | Z | TMtxVec * |
Remarks:
The operation does only per-element math.
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 3: Vector MulAndDiv(TVec *X, TMtxVec *Y, const double Z);
Compute X * Y / zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | const double |
Remarks:
Computes the product of X and Y divided by the scalar 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 zScalar = 2.0;
Vector X = { 3, 6, 9, 12 };
Vector Y = { 1, 2, 3, 4 };
Vector A1 = (X * Y) / zScalar;
Vector A2 = MulAndDiv(X, Y, zScalar);
Vector A3;
A3.MulAndDiv(X, Y, 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 MulAndDiv(TMtx *X, TMtxVec *Y, const double Z);
Compute X * Y / zScalar, when X is a Matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | const double |
Remarks:
The operation does only per-element math.
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 5: Vector MulAndDiv(TVec *X, TMtxVec *Y, TMtxVec *Z);
Compute X * Y / Z
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | TMtxVec * |
Remarks:
Computes the element-wise product of X and Y, then divides the result by 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 = { 4, 8, 12, 16 };
Vector Y = { 2, 2, 2, 2 };
Vector Z = { 2, 4, 6, 8 };
Vector A1 = (X * Y) / Z;
Vector A2 = MulAndDiv(X, Y, Z);
Vector A3;
A3.MulAndDiv(X, Y, 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 6: Matrix MulAndDiv(TMtx *X, TMtxVec *Y, TMtxVec *Z);
Compute X * Y / Z, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | TMtxVec * |
Remarks:
The operation does only per-element math.
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 7: Vector MulAndDiv(TVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z);
Compute X Y xyScale / Z
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 8: Matrix MulAndDiv(TMtx *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z);
Compute X Y xyScale / Z, where X is a Matrix
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 9: Vector MulAndDiv(TVec *X, TMtxVec *Y, const TCplx &Z);
Compute X * Y / zScalar
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler