Overload List
Overload 1: Vector AddScaledC(TVec *X, const double xScale, TMtxVec *Y, const double yScale, const double Z);
Compute X*xScale + Y*yScale + zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | xScale | const double | |
| 3 | Y | TMtxVec * | |
| 4 | yScale | const double | |
| 5 | Z | const double |
Remarks:
Computes X*xScale + Y*yScale plus a 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 xScale = 1.0, yScale = 2.0, zScalar = 3.0;
Vector X = { 1, 2, 3, 4 };
Vector Y = { 2, 3, 4, 5 };
Vector A1 = X * xScale + Y * yScale + zScalar;
Vector A2 = AddScaledC(X, xScale, Y, yScale, zScalar);
Vector A3;
A3.AddScaledC(X, xScale, Y, yScale, 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 2: Matrix AddScaledC(TMtx *X, const double xScale, TMtxVec *Y, const double yScale, const double Z);
Compute X*xScale + Y*yScale + zScalar, when X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | xScale | const double | |
| 3 | Y | TMtxVec * | |
| 4 | yScale | const double | |
| 5 | Z | const double |
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 3: Vector AddScaledC(TVec *X, TMtxVec *Y, const double yScale, const double Z);
Compute X + Y*yScale + zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | yScale | const double | |
| 4 | Z | const double |
Remarks:
Computes the sum of X and Y scaled by yScale, with an added 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 yScale = 1.5, zScalar = 3.0;
Vector X = { 1, 2, 3, 4 };
Vector Y = { 2, 3, 4, 5 };
Vector A1 = X + Y * yScale + zScalar;
Vector A2 = AddScaledC(X, Y, yScale, zScalar);
Vector A3;
A3.AddScaledC(X, Y, yScale, 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 AddScaledC(TMtx *X, TMtxVec *Y, const double yScale, const double Z);
Compute X + Y*yScale + zScalar, where X is a Matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | yScale | const double | |
| 4 | Z | const double |
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 5: Vector AddScaledC(TVec *X, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);
Compute X + Y*yScale + zScalar
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 6: Matrix AddScaledC(TMtx *X, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);
Compute X + Y*yScale + zScalar, where X is a Matrix.
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 7: Vector AddScaledC(TVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale, const TCplx &Z);
Compute X*xScale + Y*yScale + zScalar
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler