Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Matrix DivideElem(TCplx X, TMtx Y, TMtxVec Z) | Result = xScalar / (Y*Z), where Y is a Matrix |
| 2 | Vector DivideElem(TCplx X, TVec Y, TMtxVec Z) | Result = xScalar / (Y*Z) |
| 3 | Matrix DivideElem(TMtx X, TMtxVec Y, TMtxVec Z) | Result = X / (Y*Z), when X is a Matrix |
| 4 | Vector DivideElem(TVec X, TMtxVec Y, TMtxVec Z) | Result = X / (Y*Z) |
| 5 | Matrix DivideElem(Double X, TMtx Y, TMtxVec Z) | Result = xScalar / (Y*Z), when Y is a Matrix |
| 6 | Vector DivideElem(Double X, TVec Y, TMtxVec Z) | Result = xScalar / (Y*Z) |
Overload 1: Matrix DivideElem(TCplx X, TMtx Y, TMtxVec Z)
Compute xScalar / (Y*Z), where Y is a Matrix
Returns: Matrix
Overload 2: Vector DivideElem(TCplx X, TVec Y, TMtxVec Z)
Compute xScalar / (Y*Z)
Returns: Vector
Overload 3: Matrix DivideElem(TMtx X, TMtxVec Y, TMtxVec Z)
Compute X / (Y*Z), when X is a Matrix
Returns: Matrix
Remarks:
The operation does only per-element math.
Overload 4: Vector DivideElem(TVec X, TMtxVec Y, TMtxVec Z)
Compute X / (Y*Z)
Returns: Vector
Remarks:
Divides X by the product of Y and Z without temporary objects.
Examples
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[] { 1, 2, 3, 4 };
Vector Z = (Vector) new double[] { 2, 2, 2, 2 };
Vector A1 = X / (Y * Z);
Vector A2 = DivideElem(X, Y, Z);
Vector A3 = new Vector();
A3.Divide(X, Y, Z);
if (!A2.IsEqual(A1)) Math387.ERaise("Problem");
if (!A3.IsEqual(A1)) Math387.ERaise("Problem");
}
}
Overload 5: Matrix DivideElem(Double X, TMtx Y, TMtxVec Z)
Compute xScalar / (Y*Z), when Y is a Matrix
Returns: Matrix
Remarks:
The operation does only per-element math.
Overload 6: Vector DivideElem(Double X, TVec Y, TMtxVec Z)
Compute xScalar / (Y*Z)
Returns: Vector
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
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
double xScalar = 100;
Vector Y = (Vector) new double[] { 2, 4, 5, 10 };
Vector Z = (Vector) new double[] { 1, 2, 2, 2 };
Vector A1 = xScalar / (Y * Z);
Vector A2 = DivideElem(xScalar, Y, Z);
Vector A3 = new Vector();
A3.Divide(xScalar, Y, Z);
if (!A2.IsEqual(A1)) Math387.ERaise("Problem");
if (!A3.IsEqual(A1)) Math387.ERaise("Problem");
}
}