Overload List
Overload 1: Vector DivAndSub(TVec *X, TMtxVec *Y, const double xyScale, TMtxVec *Z, const double zScale);
Compute (X / Y) * xyScale - Z*zScale
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | xyScale | const double | |
| 4 | Z | TMtxVec * | |
| 5 | zScale | const double |
Divides X by Y, scales the quotient by xyScale, then subtracts Z scaled by zScale, all without temporary objects.
#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 = DivAndSub(X, Y, xyScale, Z, zScale);
Vector A3;
A3.DivAndSub(X, Y, xyScale, Z, zScale);
if (!A2.IsEqual(A1)) ERaise("Problem");
if (!A3.IsEqual(A1)) ERaise("Problem");
}
Overload 2: Matrix DivAndSub(TMtx *X, TMtxVec *Y, const double xyScale, TMtxVec *Z, const double zScale);
Compute (X / Y) * xyScale - Z*zScale, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | xyScale | const double | |
| 4 | Z | TMtxVec * | |
| 5 | zScale | const double |
The operation does only per-element math.
Overload 3: Vector DivAndSub(TVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z, const TCplx &zScale);
Compute (X / Y) * xyScale - Z*zScale
The operation does only per-element math.
Overload 4: Matrix DivAndSub(TMtx *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z, const TCplx &zScale);
Compute (X / Y) * xyScale - Z*zScale, where X is a Matrix
The operation does only per-element math.
Overload 5: Vector DivAndSub(TVec *X, TMtxVec *Y, const double xyScale, const double Z);
Compute (X / Y) * xyScale - zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | xyScale | const double | |
| 4 | Z | const double |
Computes the expression (X divided by Y) multiplied by xyScale and then subtracts the scalar zScalar, all without temporary objects.
#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 = DivAndSub(X, Y, xyScale, zScalar);
Vector A3;
A3.DivAndSub(X, Y, xyScale, zScalar);
if (!A2.IsEqual(A1)) ERaise("Problem");
if (!A3.IsEqual(A1)) ERaise("Problem");
}
Overload 6: Matrix DivAndSub(TMtx *X, TMtxVec *Y, const double xyScale, const double Z);
Compute (X / Y) * xyScale - zScalar, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | xyScale | const double | |
| 4 | Z | const double |
The operation does only per-element math.
Overload 7: Vector DivAndSub(TVec *X, TMtxVec *Y, const TCplx &xyScale, const TCplx &Z);
Compute (X / Y) * xyScale - zScalar
The operation does only per-element math.
Overload 8: Matrix DivAndSub(TMtx *X, TMtxVec *Y, const TCplx &xyScale, const TCplx &Z);
Compute (X / Y) * xyScale - zScalar, where X is a Matrix
The operation does only per-element math.
Overload 9: Vector DivAndSub(TVec *X, TMtxVec *Y, TMtxVec *Z);
Compute X/Y - Z
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | TMtxVec * |
Divides X by Y element-wise and then subtracts Z, all without creating temporary objects.
#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;
Vector A2 = DivAndSub(X, Y, Z);
Vector A3;
A3.DivAndSub(X, Y, Z);
if (!A2.IsEqual(A1)) ERaise("Problem");
if (!A3.IsEqual(A1)) ERaise("Problem");
}
Overload 10: Matrix DivAndSub(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 * |
The operation does only per-element math.
Overload 11: Vector DivAndSub(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 * |
Divides X by Y element-wise, multiplies the quotient by xyScale, and then subtracts Z, without creating temporary objects.
#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 = { 8, 10, 12, 14 };
Vector Y = { 2, 2, 2, 2 };
Vector Z = { 1, 1, 1, 1 };
Vector A1 = (X / Y) * xyScale - Z;
Vector A2 = DivAndSub(X, Y, xyScale, Z);
Vector A3;
A3.DivAndSub(X, Y, xyScale, Z);
if (!A2.IsEqual(A1)) ERaise("Problem");
if (!A3.IsEqual(A1)) ERaise("Problem");
}
Overload 12: Matrix DivAndSub(TMtx *X, TMtxVec *Y, const double xyScale, TMtxVec *Z);
Compute X/Y*xyScale - Z, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | xyScale | const double | |
| 4 | Z | TMtxVec * |
The operation does only per-element math.
Overload 13: Vector DivAndSub(TVec *X, TMtxVec *Y, TMtxVec *Z, const double zScale);
Compute X/Y - Z*zScale
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | TMtxVec * | |
| 4 | zScale | const double |
Divides X by Y element-wise and then subtracts Z multiplied by zScale, all without creating temporary objects.
#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 = DivAndSub(X, Y, Z, zScale);
Vector A3;
A3.DivAndSub(X, Y, Z, zScale);
if (!A2.IsEqual(A1)) ERaise("Problem");
if (!A3.IsEqual(A1)) ERaise("Problem");
}
Overload 14: Matrix DivAndSub(TMtx *X, TMtxVec *Y, TMtxVec *Z, const double zScale);
Compute X/Y - Z*zScale, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | TMtxVec * | |
| 4 | zScale | const double |
The operation does only per-element math.
Overload 15: Vector DivAndSub(TVec *X, TMtxVec *Y, const double Z);
Compute X/Y - zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | const double |
Divides X by Y element-wise and then subtracts the scalar zScalar, without creating temporary objects.
#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;
Vector A2 = DivAndSub(X, Y, zScalar);
Vector A3;
A3.DivAndSub(X, Y, zScalar);
if (!A2.IsEqual(A1)) ERaise("Problem");
if (!A3.IsEqual(A1)) ERaise("Problem");
}
Overload 16: Matrix DivAndSub(TMtx *X, TMtxVec *Y, const double Z);
Compute X/Y - zScalar, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | const double |
The operation does only per-element math.
Overload 17: Vector DivAndSub(TVec *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z);
Compute X/Y*xyScale - Z
Overload 18: Matrix DivAndSub(TMtx *X, TMtxVec *Y, const TCplx &xyScale, TMtxVec *Z);
Compute X/Y*xyScale - Z, where X is a Matrix
Overload 19: Vector DivAndSub(TVec *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale);
Compute X/Y - Z*zScale
Overload 20: Matrix DivAndSub(TMtx *X, TMtxVec *Y, TMtxVec *Z, const TCplx &zScale);
Compute X/Y - Z*zScale, where X is a Matrix
Overload 21: Vector DivAndSub(TVec *X, TMtxVec *Y, const TCplx &Z);
Compute X/Y - zScalar