Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVec Mul(TMtxVec Vec) | Vector multiplication. |
| └ indexed: TMtxVec Mul(TMtxVec Vec, Int32 VecIndex, Int32 Index, Int32 Len) | ||
| 2 | TMtxVec Mul(TMtxVec Vec1, TMtxVec Vec2) | Multiply all Vec1 elements with corresponding Vec2 elements. |
| └ indexed: TMtxVec Mul(TMtxVec Vec1, TMtxVec Vec2, Int32 Vec1Index, Int32 Vec2Index, Int32 Index, Int32 Len) | ||
| 3 | TMtxVec Mul(TMtxVec X, TMtxVec Y, TCplx Z) | self = X*Y*zScalar |
| └ indexed: TMtxVec Mul(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, TCplx Z, Int32 Index, Int32 Len) | ||
| 4 | TMtxVec Mul(TMtxVec X, TMtxVec Y, TMtxVec Z) | self = X*Y*Z |
| └ indexed: TMtxVec Mul(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, TMtxVec Z, Int32 zIndex, Int32 Index, Int32 Len) | ||
| 5 | TMtxVec Mul(TMtxVec X, TMtxVec Y, Double Z) | self = X*Y*zScalar |
| └ indexed: TMtxVec Mul(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, Double Z, Int32 Index, Int32 Len) | ||
| 6 | TMtxVec Mul(TCplx Value) | Multiply all calling object elements with complex Value in-place. |
| └ indexed: TMtxVec Mul(TCplx Value, Int32 Index, Int32 Len) | ||
| 7 | TMtxVec Mul(TMtxVec Vec, TCplx Value) | Multiply each element of Vec with complex Value. |
| └ indexed: TMtxVec Mul(TMtxVec Vec, TCplx Value, Int32 VecIndex, Int32 Index, Int32 Len) | ||
| 8 | TMtxVec Mul(TMtxVec Vec, Double Value) | Multiply each element of Vec with Value. |
| └ indexed: TMtxVec Mul(TMtxVec Vec, Double Value, Int32 VecIndex, Int32 Index, Int32 Len) | ||
| 9 | TMtxVec Mul(Double Value) | Multiply object elements with Value. |
| └ indexed: TMtxVec Mul(Double Value, Int32 Index, Int32 Len) |
Overload 1: TMtxVec Mul(TMtxVec Vec)
Vector multiplication.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
Result: stored in self (calling object), returns self for chaining
Multiply each of Vec elements with corresponding elements in the calling object. Size and Dew.Math.TMtxVec.Complex property of the calling object are set automatically. The result is stored in the calling object.
Vector a = new Vector();
a.SetIt(new double[] { 1.0, 2.0, 3.0, 4.0 });
Vector b = new Vector();
b.SetIt(new double[] { 5.0, 6.0, 7.0, 8.0 });
a.Mul(b);
Vector expected = new Vector();
expected.SetIt(new double[] { 5.0, 12.0, 21.0, 32.0 });
if (!a.IsEqual(expected, 1e-10, TCompare.cmpAbsolute))
throw new Exception("Vector.Mul: mismatch");
Indexed: TMtxVec Mul(TMtxVec Vec, Int32 VecIndex, Int32 Index, Int32 Len)
Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with calling object elements [Index]..[Index+Len-1] in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
| 2 | VecIndex | Int32 | |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
An exception is raised if Vec and calling object Dew.Math.TMtxVec.Complex property do not match or if array borders are overrun/underrun.
Overload 2: TMtxVec Mul(TMtxVec Vec1, TMtxVec Vec2)
Multiply all Vec1 elements with corresponding Vec2 elements.
Result: stored in self (calling object), returns self for chaining
Store the results in calling object. Size and Dew.Math.TMtxVec.Complex property of calling object are adjusted automatically to match those of Vec1 and Vec2. An exception is raised if Vec1 and Vec2 size and Dew.Math.TMtxVec.Complex property do not match.
Vector a = new Vector();
Vector x = new Vector();
x.SetIt(new double[] { 1.0, 2.0, 3.0, 4.0 });
Vector y = new Vector();
y.SetIt(new double[] { 5.0, 6.0, 7.0, 8.0 });
a.Mul(x, y);
Vector expected = new Vector();
expected.SetIt(new double[] { 5.0, 12.0, 21.0, 32.0 });
if (!a.IsEqual(expected, 1e-10, TCompare.cmpAbsolute))
throw new Exception("Vector.Mul: mismatch");
Indexed: TMtxVec Mul(TMtxVec Vec1, TMtxVec Vec2, Int32 Vec1Index, Int32 Vec2Index, Int32 Index, Int32 Len)
Multiply Vec1 elements [Vec1Index]..[Vec1Index+Len-1] with Vec2 object elements [Vec2Index]..[Vec2Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec1 | TMtxVec | source TVec or TMtx |
| 2 | Vec2 | TMtxVec | source TVec or TMtx |
| 3 | Vec1Index | Int32 | |
| 4 | Vec2Index | Int32 | |
| 5 | Index | Int32 | start index |
| 6 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Store the results in calling object elements [Index]..[Index+Len-1]. Size and Dew.Math.TMtxVec.Complex properties of the calling object must be set explicitly. An exception is raised if Dew.Math.TMtxVecBase.ConditionCheck is True and array borders are overrun or underrun.
Overload 3: TMtxVec Mul(TMtxVec X, TMtxVec Y, TCplx Z)
Compute X*Y*zScalar
Result: stored in self (calling object), returns self for chaining
The following expression would also run at the same or higher speed, when passing X also for the Z parameter:
X^2*zScalar
Indexed: TMtxVec Mul(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, TCplx Z, Int32 Index, Int32 Len)
Compute X*Y*zScalar on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | source TVec or TMtx |
| 2 | XIndex | Int32 | X start index |
| 3 | Y | TMtxVec | source TVec or TMtx |
| 4 | YIndex | Int32 | Y start index |
| 5 | Z | TCplx | scalar |
| 6 | Index | Int32 | start index |
| 7 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Overload 4: TMtxVec Mul(TMtxVec X, TMtxVec Y, TMtxVec Z)
Compute X*Y*Z
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | source TVec or TMtx |
| 2 | Y | TMtxVec | source TVec or TMtx |
| 3 | Z | TMtxVec | source TVec or TMtx |
Result: stored in self (calling object), returns self for chaining
The following expression would also run at the same or higher speed, when passing X also for the Z parameter:
X^2*Y
Indexed: TMtxVec Mul(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, TMtxVec Z, Int32 zIndex, Int32 Index, Int32 Len)
Compute X*Y*Z on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | source TVec or TMtx |
| 2 | XIndex | Int32 | X start index |
| 3 | Y | TMtxVec | source TVec or TMtx |
| 4 | YIndex | Int32 | Y start index |
| 5 | Z | TMtxVec | source TVec or TMtx |
| 6 | zIndex | Int32 | |
| 7 | Index | Int32 | start index |
| 8 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Overload 5: TMtxVec Mul(TMtxVec X, TMtxVec Y, Double Z)
Compute X*Y*zScalar
Result: stored in self (calling object), returns self for chaining
The following expression would also run at the same or higher speed, when passing X also for the Z parameter:
X^2*zScalar
Indexed: TMtxVec Mul(TMtxVec X, Int32 XIndex, TMtxVec Y, Int32 YIndex, Double Z, Int32 Index, Int32 Len)
Compute X*Y*zScalar on sub array
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | source TVec or TMtx |
| 2 | XIndex | Int32 | X start index |
| 3 | Y | TMtxVec | source TVec or TMtx |
| 4 | YIndex | Int32 | Y start index |
| 5 | Z | Double | scalar |
| 6 | Index | Int32 | start index |
| 7 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Overload 6: TMtxVec Mul(TCplx Value)
Multiply all calling object elements with complex Value in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | TCplx | scalar |
Result: stored in self (calling object), returns self for chaining
Indexed: TMtxVec Mul(TCplx Value, Int32 Index, Int32 Len)
Multipy calling object elements [Index]..[Index+Len-1] with complex Value in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | TCplx | scalar |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
An exception is raised if array borders are overrun or underrun.
Overload 7: TMtxVec Mul(TMtxVec Vec, TCplx Value)
Multiply each element of Vec with complex Value.
Result: stored in self (calling object), returns self for chaining
Store the result in the calling object. Size of the calling object is set automatically. Dew.Math.TMtxVec.Complex property of the calling object is set to True.
Indexed: TMtxVec Mul(TMtxVec Vec, TCplx Value, Int32 VecIndex, Int32 Index, Int32 Len)
Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with complex Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
| 2 | Value | TCplx | scalar |
| 3 | VecIndex | Int32 | |
| 4 | Index | Int32 | start index |
| 5 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Store the result in calling object elements [Index]..[Index+Len-1]. Size of the calling object is not changed. An exception is raised if array borders are overrun or underrun. Dew.Math.TMtxVec.Complex propertiy of the calling object is set to True.
Overload 8: TMtxVec Mul(TMtxVec Vec, Double Value)
Multiply each element of Vec with Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
| 2 | Value | Double | scalar |
Result: stored in self (calling object), returns self for chaining
Store the result in the calling object. Size and Dew.Math.TMtxVec.Complex properties of the calling object are adjusted automatically.
Indexed: TMtxVec Mul(TMtxVec Vec, Double Value, Int32 VecIndex, Int32 Index, Int32 Len)
Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | source TVec or TMtx |
| 2 | Value | Double | scalar |
| 3 | VecIndex | Int32 | |
| 4 | Index | Int32 | start index |
| 5 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Store the result in calling object elements [Index]..[Index+Len-1]. Size of the calling object is not changed. An exception is raised if array borders are overrun or underrun. Dew.Math.TMtxVec.Complex propertiy of the calling object is set implicitly.
Overload 9: TMtxVec Mul(Double Value)
Multiply object elements with Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Double | scalar |
Result: stored in self (calling object), returns self for chaining
Multiplies all calling object elements with Value in-place.
TVec v;
v = TVec.Create;
try
{
v.SetIt(false,new double[] {2,3,5}); // v = new double[] {2,3,5}
v.Mul(3); // v = new double[] {6,9,15}
}
finally
{
v.Free;
}
Indexed: TMtxVec Mul(Double Value, Int32 Index, Int32 Len)
Multipy calling object elements [Index]..[Index+Len-1] with Value in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Double | scalar |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
An exception is raised if array borders are overrun or underrun.