Overload List
Overload 1: Matrix DivAndSub(TMtx X, TMtxVec Y, TCplx Z)
Compute X/Y - zScalar, where X is a Matrix
Returns: Matrix
Overload 2: Matrix DivAndSub(TMtx X, TMtxVec Y, TCplx xyScale, TCplx Z)
Compute (X / Y) * xyScale - zScalar, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | source TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | TCplx | scalar |
| 4 | Z | TCplx | scalar |
Returns: Matrix
The operation does only per-element math.
Overload 3: Matrix DivAndSub(TMtx X, TMtxVec Y, TCplx xyScale, TMtxVec Z)
Compute X/Y*xyScale - Z, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | source TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | TCplx | scalar |
| 4 | Z | TMtxVec | source TVec or TMtx |
Returns: Matrix
Overload 4: Matrix DivAndSub(TMtx X, TMtxVec Y, TCplx xyScale, TMtxVec Z, TCplx zScale)
Compute (X / Y) * xyScale - Z*zScale, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | source TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | TCplx | scalar |
| 4 | Z | TMtxVec | source TVec or TMtx |
| 5 | zScale | TCplx | scalar |
Returns: Matrix
The operation does only per-element math.
Overload 5: Matrix DivAndSub(TMtx X, TMtxVec Y, TMtxVec Z)
Compute X/Y - Z, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 6: Matrix DivAndSub(TMtx X, TMtxVec Y, TMtxVec Z, TCplx zScale)
Compute X/Y - Z*zScale, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | source TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | Z | TMtxVec | source TVec or TMtx |
| 4 | zScale | TCplx | scalar |
Returns: Matrix
Overload 7: Matrix DivAndSub(TMtx X, TMtxVec Y, TMtxVec Z, Double zScale)
Compute X/Y - Z*zScale, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | source TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | Z | TMtxVec | source TVec or TMtx |
| 4 | zScale | Double | scalar |
Returns: Matrix
The operation does only per-element math.
Overload 8: Matrix DivAndSub(TMtx X, TMtxVec Y, Double Z)
Compute X/Y - zScalar, where X is a Matrix
Returns: Matrix
The operation does only per-element math.
Overload 9: Matrix DivAndSub(TMtx X, TMtxVec Y, Double xyScale, TMtxVec Z)
Compute X/Y*xyScale - Z, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | source TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | Double | scalar |
| 4 | Z | TMtxVec | source TVec or TMtx |
Returns: Matrix
The operation does only per-element math.
Overload 10: Matrix DivAndSub(TMtx X, TMtxVec Y, Double xyScale, TMtxVec Z, Double zScale)
Compute (X / Y) * xyScale - Z*zScale, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | source TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | Double | scalar |
| 4 | Z | TMtxVec | source TVec or TMtx |
| 5 | zScale | Double | scalar |
Returns: Matrix
The operation does only per-element math.
Overload 11: Matrix DivAndSub(TMtx X, TMtxVec Y, Double xyScale, Double Z)
Compute (X / Y) * xyScale - zScalar, where X is a Matrix
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtx | source TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | Double | scalar |
| 4 | Z | Double | scalar |
Returns: Matrix
The operation does only per-element math.
Overload 12: Vector DivAndSub(TVec X, TMtxVec Y, TCplx Z)
Compute X/Y - zScalar
Returns: Vector
Overload 13: Vector DivAndSub(TVec X, TMtxVec Y, TCplx xyScale, TCplx Z)
Compute (X / Y) * xyScale - zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | TCplx | scalar |
| 4 | Z | TCplx | scalar |
Returns: Vector
The operation does only per-element math.
Overload 14: Vector DivAndSub(TVec X, TMtxVec Y, TCplx xyScale, TMtxVec Z)
Compute X/Y*xyScale - Z
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | TCplx | scalar |
| 4 | Z | TMtxVec | source TVec or TMtx |
Returns: Vector
Overload 15: Vector DivAndSub(TVec X, TMtxVec Y, TCplx xyScale, TMtxVec Z, TCplx zScale)
Compute (X / Y) * xyScale - Z*zScale
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | TCplx | scalar |
| 4 | Z | TMtxVec | source TVec or TMtx |
| 5 | zScale | TCplx | scalar |
Returns: Vector
The operation does only per-element math.
Overload 16: Vector DivAndSub(TVec X, TMtxVec Y, TMtxVec Z)
Compute X/Y - Z
Returns: Vector
Divides X by Y element-wise and then subtracts Z, all without creating temporary objects.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
Vector X = (Vector)new double[] { 6, 8, 10, 12 };
Vector Y = (Vector)new double[] { 2, 2, 2, 2 };
Vector Z = (Vector)new double[] { 1, 1, 1, 1 };
Vector A1 = (X / Y) - Z;
Vector A2 = DivAndSub(X, Y, Z);
Vector A3 = new Vector();
A3.DivAndSub(X, Y, Z);
if (!A2.IsEqual(A1)) Math387.ERaise("Problem");
if (!A3.IsEqual(A1)) Math387.ERaise("Problem");
}
}
Overload 17: Vector DivAndSub(TVec X, TMtxVec Y, TMtxVec Z, TCplx zScale)
Compute X/Y - Z*zScale
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | Z | TMtxVec | source TVec or TMtx |
| 4 | zScale | TCplx | scalar |
Returns: Vector
Overload 18: Vector DivAndSub(TVec X, TMtxVec Y, TMtxVec Z, Double zScale)
Compute X/Y - Z*zScale
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | Z | TMtxVec | source TVec or TMtx |
| 4 | zScale | Double | scalar |
Returns: Vector
Divides X by Y element-wise and then subtracts Z multiplied by zScale, all without creating temporary objects.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
double zScale = 2.0;
Vector X = (Vector)new double[] { 6, 8, 10, 12 };
Vector Y = (Vector)new double[] { 2, 2, 2, 2 };
Vector Z = (Vector)new double[] { 1, 1, 1, 1 };
Vector A1 = (X / Y) - (Z * zScale);
Vector A2 = DivAndSub(X, Y, Z, zScale);
Vector A3 = new Vector();
A3.DivAndSub(X, Y, Z, zScale);
if (!A2.IsEqual(A1)) Math387.ERaise("Problem");
if (!A3.IsEqual(A1)) Math387.ERaise("Problem");
}
}
Overload 19: Vector DivAndSub(TVec X, TMtxVec Y, Double Z)
Compute X/Y - zScalar
Returns: Vector
Divides X by Y element-wise and then subtracts the scalar zScalar, without creating temporary objects.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
double zScalar = 2.0;
Vector X = (Vector)new double[] { 6, 8, 10, 12 };
Vector Y = (Vector)new double[] { 2, 2, 2, 2 };
Vector A1 = (X / Y) - zScalar;
Vector A2 = DivAndSub(X, Y, zScalar);
Vector A3 = new Vector();
A3.DivAndSub(X, Y, zScalar);
if (!A2.IsEqual(A1)) Math387.ERaise("Problem");
if (!A3.IsEqual(A1)) Math387.ERaise("Problem");
}
}
Overload 20: Vector DivAndSub(TVec X, TMtxVec Y, Double xyScale, TMtxVec Z)
Compute X/Y*xyScale - Z
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | Double | scalar |
| 4 | Z | TMtxVec | source TVec or TMtx |
Returns: Vector
Divides X by Y element-wise, multiplies the quotient by xyScale, and then subtracts Z, without creating temporary objects.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
double xyScale = 1.5;
Vector X = (Vector)new double[] { 8, 10, 12, 14 };
Vector Y = (Vector)new double[] { 2, 2, 2, 2 };
Vector Z = (Vector)new double[] { 1, 1, 1, 1 };
Vector A1 = (X / Y) * xyScale - Z;
Vector A2 = DivAndSub(X, Y, xyScale, Z);
Vector A3 = new Vector();
A3.DivAndSub(X, Y, xyScale, Z);
if (!A2.IsEqual(A1)) Math387.ERaise("Problem");
if (!A3.IsEqual(A1)) Math387.ERaise("Problem");
}
}
Overload 21: Vector DivAndSub(TVec X, TMtxVec Y, Double xyScale, TMtxVec Z, Double zScale)
Compute (X / Y) * xyScale - Z*zScale
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | Double | scalar |
| 4 | Z | TMtxVec | source TVec or TMtx |
| 5 | zScale | Double | scalar |
Returns: Vector
Divides X by Y, scales the quotient by xyScale, then subtracts Z scaled by zScale, all without temporary objects.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
double xyScale = 1.5, zScale = 2.0;
Vector X = (Vector) new double[] { 8, 10, 12, 14 };
Vector Y = (Vector) new double[] { 2, 2, 2, 2 };
Vector Z = (Vector) new double[] { 1, 1, 1, 1 };
Vector A1 = (X / Y) * xyScale - Z * zScale;
Vector A2 = DivAndSub(X, xyScale, Y, xyScale, Z, zScale);
Vector A3 = new Vector();
A3.DivAndSub(X, xyScale, Y, xyScale, Z, zScale);
if (!A2.IsEqual(A1)) Math387.ERaise("Problem");
if (!A3.IsEqual(A1)) Math387.ERaise("Problem");
}
}
Overload 22: Vector DivAndSub(TVec X, TMtxVec Y, Double xyScale, Double Z)
Compute (X / Y) * xyScale - zScalar
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | xyScale | Double | scalar |
| 4 | Z | Double | scalar |
Returns: Vector
Computes the expression (X divided by Y) multiplied by xyScale and then subtracts the scalar zScalar, all without temporary objects.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
double xyScale = 1.5, zScalar = 2.0;
Vector X = (Vector) new double[] { 8, 10, 12, 14 };
Vector Y = (Vector) new double[] { 2, 2, 2, 2 };
Vector A1 = (X / Y) * xyScale - zScalar;
Vector A2 = DivAndSub(X, xyScale, Y, xyScale, zScalar);
Vector A3 = new Vector();
A3.DivAndSub(X, xyScale, Y, xyScale, zScalar);
if (!A2.IsEqual(A1)) Math387.ERaise("Problem");
if (!A3.IsEqual(A1)) Math387.ERaise("Problem");
}
}