Vector.MulAndSub Method

Overload List

#SignatureDescription
1function MulAndSub(const X: TMtxVec; const Y: TCplx; const Z: TMtxVec; const zScale: TCplx): TMtxVec;self = X*yScalar - Z*zScale
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TCplx; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;
2function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: TCplx): TMtxVec;self = X*Y - zScalar
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TCplx; Index: Integer; Len: Integer): TMtxVec;
3function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TCplx): TMtxVec;self = (X*Y)*xyScale - zScalar
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: TCplx; const Z: TCplx; Index: Integer; Len: Integer): TMtxVec;
4function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec): TMtxVec;self = X*Y*xyScale - Z
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: TCplx; const Z: TMtxVec; zIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
5function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec; const zScale: TCplx): TMtxVec;self = (X*Y)*xyScale - Z*zScale
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: TCplx; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;
6function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec): TMtxVec;self = X*Y - Z
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
7function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): TMtxVec;self = X*Y - Z*zScale
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;
8function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): TMtxVec;self = X*Y - Z*zScale
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;
9function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: Double): TMtxVec;self = X*Y - zScalar
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: Double; Index: Integer; Len: Integer): TMtxVec;
10function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec): TMtxVec;self = X*Y*xyScale - Z
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: Double; const Z: TMtxVec; zIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
11function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec; const zScale: Double): TMtxVec;self = (X*Y)*xyScale - Z*zScale
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: Double; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;
12function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: Double; const Z: Double): TMtxVec;self = (X*Y)*xyScale - zScalar
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: Double; const Z: Double; Index: Integer; Len: Integer): TMtxVec;
13function MulAndSub(const X: TMtxVec; const Y: Double; const Z: TMtxVec; const zScale: Double): TMtxVec;self = X*yScalar - Z*zScale
└ indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: Double; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;

Overload 1: function MulAndSub(const X: TMtxVec; const Y: TCplx; const Z: TMtxVec; const zScale: TCplx): TMtxVec;

Compute X*yScalar - Z*zScale

#NameTypeDescription
1XTMtxVec
2YTCplx
3ZTMtxVec
4zScaleTCplx

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TCplx; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;

Compute X*yScalar - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTCplx
4ZTMtxVec
5zIndexInteger
6zScaleTCplx
7IndexIntegerstart index
8LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 2: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: TCplx): TMtxVec;

Compute X*Y - zScalar

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3ZTCplx

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TCplx; Index: Integer; Len: Integer): TMtxVec;

Compute X*Y - zScalar on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5ZTCplx
6IndexIntegerstart index
7LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 3: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TCplx): TMtxVec;

Compute (X*Y)*xyScale - zScalar

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3xyScaleTCplx
4ZTCplx

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: TCplx; const Z: TCplx; Index: Integer; Len: Integer): TMtxVec;

Compute (X*Y)*xyScale - zScalar on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5xyScaleTCplx
6ZTCplx
7IndexIntegerstart index
8LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 4: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec): TMtxVec;

Compute X*Y*xyScale - Z

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3xyScaleTCplx
4ZTMtxVec

Result: stored in self (calling object), returns self for chaining

Examples
uses MtxVec, MtxExpr, Math387;

var
    X, Y, Z, A1, A2, A3: Vector;
    zScale: Double;
begin
    zScale := 2.0;
    X := [3,6,9,12];
    Y := [1,2,3,4];
    Z := [2,2,2,2];
    A1 := (X * Y) - (Z * zScale);
    A2 := MulAndSub(X, Y, Z, zScale);
    A3.MulAndSub(X, Y, Z, zScale);
    if not A2.IsEqual(A1) then ERaise('Problem');
    if not A3.IsEqual(A1) then ERaise('Problem');
end;

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: TCplx; const Z: TMtxVec; zIndex: Integer; Index: Integer; Len: Integer): TMtxVec;

Compute X*Y*xyScale + Z on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5xyScaleTCplx
6ZTMtxVec
7zIndexInteger
8IndexIntegerstart index
9LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 5: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: TCplx; const Z: TMtxVec; const zScale: TCplx): TMtxVec;

Compute (X*Y)*xyScale - Z*zScale

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3xyScaleTCplx
4ZTMtxVec
5zScaleTCplx

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: TCplx; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;

Compute (X*Y)*xyScale - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5xyScaleTCplx
6ZTMtxVec
7zIndexInteger
8zScaleTCplx
9IndexIntegerstart index
10LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 6: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec): TMtxVec;

Compute X*Y - Z

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3ZTMtxVec

Result: stored in self (calling object), returns self for chaining

Examples
uses MtxVec, MtxExpr, Math387;

var
    X, Z, A1, A2, A3: Vector;
    yScalar, zScale: Double;
begin
    yScalar := 2.0;
    zScale := 3.0;
    X := [3,6,9,12];
    Z := [1,1,1,1];
    A1 := (X * yScalar) - (Z * zScale);
    A2 := MulAndSub(X, yScalar, Z, zScale);
    A3.MulAndSub(X, yScalar, Z, zScale);
    if not A2.IsEqual(A1) then ERaise('Problem');
    if not A3.IsEqual(A1) then ERaise('Problem');
end;

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; Index: Integer; Len: Integer): TMtxVec;

Compute X*Y + Z on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5ZTMtxVec
6zIndexInteger
7IndexIntegerstart index
8LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Examples
uses MtxVec, MtxExpr, Math387;

var
    X, Y, Z, A1, A2, A3: Vector;
begin
    X := [3,6,9,12];
    Y := [1,2,3,4];
    Z := [2,2,2,2];
    A1 := (X * Y) - Z;
    A2 := MulAndSub(X, Y, Z);
    A3.MulAndSub(X, Y, Z);
    if not A2.IsEqual(A1) then ERaise('Problem');
    if not A3.IsEqual(A1) then ERaise('Problem');
end;

Overload 7: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: TCplx): TMtxVec;

Compute X*Y - Z*zScale

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3ZTMtxVec
4zScaleTCplx

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; const zScale: TCplx; Index: Integer; Len: Integer): TMtxVec;

Compute X*Y + Z*zScale on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5ZTMtxVec
6zIndexInteger
7zScaleTCplx
8IndexIntegerstart index
9LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 8: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: TMtxVec; const zScale: Double): TMtxVec;

Compute X*Y - Z*zScale

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3ZTMtxVec
4zScaleDouble

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;

Compute X*Y + Z*zScale on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5ZTMtxVec
6zIndexInteger
7zScaleDouble
8IndexIntegerstart index
9LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 9: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const Z: Double): TMtxVec;

Compute X*Y - zScalar

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3ZDouble

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const Z: Double; Index: Integer; Len: Integer): TMtxVec;

Compute X*Y - zScalar on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5ZDouble
6IndexIntegerstart index
7LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 10: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec): TMtxVec;

Compute X*Y*xyScale - Z

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3xyScaleDouble
4ZTMtxVec

Result: stored in self (calling object), returns self for chaining

Examples
uses MtxVec, MtxExpr, Math387;

var
    X, Y, Z, A1, A2, A3: Vector;
    xyScale: Double;
begin
    xyScale := 1.5;
    X := [3,6,9,12];
    Y := [1,2,3,4];
    Z := [2,2,2,2];
    A1 := (X * Y * xyScale) - Z;
    A2 := MulAndSub(X, Y, xyScale, Z);
    A3.MulAndSub(X, Y, xyScale, Z);
    if not A2.IsEqual(A1) then ERaise('Problem');
    if not A3.IsEqual(A1) then ERaise('Problem');
end;

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: Double; const Z: TMtxVec; zIndex: Integer; Index: Integer; Len: Integer): TMtxVec;

Compute X*Y*xyScale + Z on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5xyScaleDouble
6ZTMtxVec
7zIndexInteger
8IndexIntegerstart index
9LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Examples
uses MtxVec, MtxExpr, Math387;

var
    X, Y, A1, A2, A3: Vector;
    zScalar: Double;
begin
    zScalar := 2.0;
    X := [3,6,9,12];
    Y := [1,2,3,4];
    A1 := (X * Y) - zScalar;
    A2 := MulAndSub(X, Y, zScalar);
    A3.MulAndSub(X, Y, zScalar);
    if not A2.IsEqual(A1) then ERaise('Problem');
    if not A3.IsEqual(A1) then ERaise('Problem');
end;

Overload 11: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: Double; const Z: TMtxVec; const zScale: Double): TMtxVec;

Compute (X*Y)*xyScale - Z*zScale

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3xyScaleDouble
4ZTMtxVec
5zScaleDouble

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: Double; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;

Compute (X*Y)*xyScale - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5xyScaleDouble
6ZTMtxVec
7zIndexInteger
8zScaleDouble
9IndexIntegerstart index
10LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 12: function MulAndSub(const X: TMtxVec; const Y: TMtxVec; const xyScale: Double; const Z: Double): TMtxVec;

Compute (X*Y)*xyScale - zScalar

#NameTypeDescription
1XTMtxVec
2YTMtxVec
3xyScaleDouble
4ZDouble

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: TMtxVec; YIndex: Integer; const xyScale: Double; const Z: Double; Index: Integer; Len: Integer): TMtxVec;

Compute (X*Y)*xyScale - zScalar on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YTMtxVec
4YIndexIntegerY start index
5xyScaleDouble
6ZDouble
7IndexIntegerstart index
8LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 13: function MulAndSub(const X: TMtxVec; const Y: Double; const Z: TMtxVec; const zScale: Double): TMtxVec;

Compute X*yScalar - Z*zScale

#NameTypeDescription
1XTMtxVec
2YDouble
3ZTMtxVec
4zScaleDouble

Result: stored in self (calling object), returns self for chaining

Indexed: function MulAndSub(const X: TMtxVec; XIndex: Integer; const Y: Double; const Z: TMtxVec; zIndex: Integer; const zScale: Double; Index: Integer; Len: Integer): TMtxVec;

Compute X*yScalar - Z*zScale on sub array

#NameTypeDescription
1XTMtxVec
2XIndexIntegerX start index
3YDouble
4ZTMtxVec
5zIndexInteger
6zScaleDouble
7IndexIntegerstart index
8LenIntegerelement count

Result: stored in self (calling object), returns self for chaining