Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Vector AddScaledSqr(TVec *X, const double xScale, TMtxVec *Y, const double yScale); | Compute sqr(X*xScale + Y*yScale) |
| 2 | Matrix AddScaledSqr(TMtx *X, const double xScale, TMtxVec *Y, const double yScale); | Compute sqr(X*xScale + Y*yScale), when X is a Matrix |
| 3 | Vector AddScaledSqr(TVec *X, TMtxVec *Y, const double yScale); | Compute sqr(X + Y*yScale) |
| 4 | Matrix AddScaledSqr(TMtx *X, TMtxVec *Y, const double yScale); | Compute sqr(X + Y*yScale) when X is a matrix |
| 5 | Vector AddScaledSqr(TVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale); | Compute sqr(X*xScale + Y*yScale) |
| 6 | Matrix AddScaledSqr(TMtx *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale); | Compute sqr(X*xScale + Y*yScale), where X is a Matrix |
| 7 | Vector AddScaledSqr(TVec *X, TMtxVec *Y, const TCplx &yScale); | Compute sqr(X + Y*yScale) |
| 8 | Matrix AddScaledSqr(TMtx *X, TMtxVec *Y, const TCplx &yScale); | Compute sqr(X + Y*yScale), where X is a Matrix |
Overload 1: Vector AddScaledSqr(TVec *X, const double xScale, TMtxVec *Y, const double yScale);
Compute sqr(X*xScale + Y*yScale)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | xScale | const double | |
| 3 | Y | TMtxVec * | |
| 4 | yScale | const double |
Remarks:
Computes the square of the expression X*xScale + Y*yScale 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.5, yScale = -1.5;
Vector X = { 1, 2, 3, 4 };
Vector Y = { 2, 3, 4, 5 };
Vector A1 = Sqr(X * xScale + Y * yScale);
Vector A2 = AddScaledSqr(X, xScale, Y, yScale);
Vector A3;
A3.AddScaledSqr(X, xScale, Y, yScale);
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 AddScaledSqr(TMtx *X, const double xScale, TMtxVec *Y, const double yScale);
Compute sqr(X*xScale + Y*yScale), when X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | xScale | const double | |
| 3 | Y | TMtxVec * | |
| 4 | yScale | const double |
Remarks:
The operation does only per-element math.
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 3: Vector AddScaledSqr(TVec *X, TMtxVec *Y, const double yScale);
Compute sqr(X + Y*yScale)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TMtxVec * | |
| 3 | yScale | const double |
Remarks:
Computes the square of (X + Y*yScale) 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 yScale = 1.5;
Vector X = { 1, 2, 3, 4 };
Vector Y = { 2, 3, 4, 5 };
Vector A1 = Sqr(X + Y * yScale);
Vector A2 = AddScaledSqr(X, Y, yScale);
Vector A3;
A3.AddScaledSqr(X, Y, yScale);
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 AddScaledSqr(TMtx *X, TMtxVec *Y, const double yScale);
Compute sqr(X + Y*yScale) when X is a matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx * | |
| 2 | Y | TMtxVec * | |
| 3 | yScale | 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 AddScaledSqr(TVec *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale);
Compute sqr(X*xScale + Y*yScale)
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 6: Matrix AddScaledSqr(TMtx *X, const TCplx &xScale, TMtxVec *Y, const TCplx &yScale);
Compute sqr(X*xScale + Y*yScale), where X is a Matrix
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler
Overload 7: Vector AddScaledSqr(TVec *X, TMtxVec *Y, const TCplx &yScale);
Compute sqr(X + Y*yScale)
Declared in Dew::Math::Units::MtxExpr · Dew.Math/Units.MtxExpr.h · Cross-compiler