Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Vector Sub(TVec *X, TMtxVec *Y, TMtxVec *Z); | Compute X - Y - Z |
| 2 | Matrix Sub(TMtx *X, TMtxVec *Y, TMtxVec *Z); | Compute X - Y - Z, where X is a Matrix |
| 3 | Vector Sub(TVec *X, TMtxVec *Y, const double Z); | Compute X - Y - zScalar |
| 4 | Matrix Sub(TMtx *X, TMtxVec *Y, const double Z); | Compute X - Y - zScalar, where X is a Matrix. |
| 5 | Vector Sub(TVec *X, TMtxVec *Y, const TCplx &Z); | Compute X - Y - zScalar |
| 6 | Matrix Sub(TMtx *X, TMtxVec *Y, const TCplx &Z); | Compute X - Y - zScalar, where X is a Matrix. |
Overload 1: Vector Sub(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 difference of three vector-based operands (X, Y, and 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 = { 5, 6, 7, 8 };
Vector Y = { 1, 2, 3, 4 };
Vector Z = { 1, 1, 1, 1 };
Vector A1 = X - Y - Z;
Vector A2 = Sub(X, Y, Z);
Vector A3;
A3.Sub(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 2: Matrix Sub(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 * |
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 3: Vector Sub(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 difference between X and Y and then subtracts 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 zScalar = 3.0;
Vector X = { 5, 6, 7, 8 };
Vector Y = { 1, 2, 3, 4 };
Vector A1 = X - Y - zScalar;
Vector A2 = Sub(X, Y, zScalar);
Vector A3;
A3.Sub(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 Sub(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 |
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 5: Vector Sub(TVec *X, TMtxVec *Y, const TCplx &Z);
Compute X - Y - zScalar
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler