Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Vector DivideElem(TVec *X, TMtxVec *Y, TMtxVec *Z); | Compute X / (Y*Z) |
| 2 | Matrix DivideElem(TMtx *X, TMtxVec *Y, TMtxVec *Z); | Compute X / (Y*Z), when X is a Matrix |
| 3 | Vector DivideElem(const double X, TVec *Y, TMtxVec *Z); | Compute xScalar / (Y*Z) |
| 4 | Matrix DivideElem(const double X, TMtx *Y, TMtxVec *Z); | Compute xScalar / (Y*Z), when Y is a Matrix |
| 5 | Vector DivideElem(const TCplx &X, TVec *Y, TMtxVec *Z); | Compute xScalar / (Y*Z) |
| 6 | Matrix DivideElem(const TCplx &X, TMtx *Y, TMtxVec *Z); | Compute xScalar / (Y*Z), where Y is a Matrix |
Overload 1: Vector DivideElem(TVec *X, TMtxVec *Y, TMtxVec *Z);
Compute X / (Y*Z)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | TMtxVec * |
Remarks:
Divides X by the product of Y and 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()
{
Vector X = { 6, 8, 10, 12 };
Vector Y = { 1, 2, 3, 4 };
Vector Z = { 2, 2, 2, 2 };
Vector A1 = X / (Y * Z);
Vector A2 = DivideElem(X, Y, Z);
Vector A3;
A3.Divide(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 DivideElem(TMtx *X, TMtxVec *Y, TMtxVec *Z);
Compute X / (Y*Z), when X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | Z | TMtxVec * |
Remarks:
The operation does only per-element math.
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 Y, Z, A1, A2, A3;
double xScalar;
xScalar = 100;
Y = {2, 4, 5, 10};
Z = {1, 2, 2, 2};
A1 = xScalar / (Y * Z);
A2 = DivideElem(xScalar, Y, Z);
A3.Divide(xScalar, 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 3: Vector DivideElem(const double X, TVec *Y, TMtxVec *Z);
Compute xScalar / (Y*Z)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | const double | |
| 2 | Y | TVec * | |
| 3 | Z | TMtxVec * |
Remarks:
Divides a scalar xScalar by the product of Y and Z without temporary objects. Since the first parameter is scalar, the overload is provided by splitting the second parameter into TVec and TMtx versions.
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 xScalar = 100;
Vector Y = { 2, 4, 5, 10 };
Vector Z = { 1, 2, 2, 2 };
Vector A1 = xScalar / (Y * Z);
Vector A2 = DivideElem(xScalar, Y, Z);
Vector A3;
A3.Divide(xScalar, 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 4: Matrix DivideElem(const double X, TMtx *Y, TMtxVec *Z);
Compute xScalar / (Y*Z), when Y is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | const double | |
| 2 | Y | TMtx * | |
| 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 5: Vector DivideElem(const TCplx &X, TVec *Y, TMtxVec *Z);
Compute xScalar / (Y*Z)
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler