Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Inv: TMtx; | Calculates matrix inverse (Mtx^-1). |
| └ indexed: function Inv(Index: Integer; Len: Integer): TMtxVec; | ||
| 2 | function Inv(MtxType: TMtxType): TMtx; | self = inverse of the matrix |
| 3 | function Inv(const X: TMtxVec): TMtxVec; | Calculate the inverse of all X object elements without the limiting operating. |
| └ indexed: function Inv(const X: TMtxVec; XIndex: Integer; Index: Integer; Len: Integer): TMtxVec; | ||
| 4 | function Inv(const X: TMtxVec; Threshold: Double): TMtxVec; | Calculate the inverse of all X object elements anmd store the results to calling object elements. |
| └ indexed: function Inv(const X: TMtxVec; Threshold: Double; XIndex: Integer; Index: Integer; Len: Integer): TMtxVec; | ||
| 5 | function Inv(Threshold: Double): TMtxVec; | Calculate the inverse of all calling object elements in-place. |
| └ indexed: function Inv(Threshold: Double; Index: Integer; Len: Integer): TMtxVec; |
Overload 1: function Inv: TMtx;
Calculates matrix inverse (Mtx^-1).
Result: stored in self (calling object), returns self for chaining
Calculate the inverse (Mtx^-1) of the calling matrix. If the calling matrix is not Matrix.Quadratic, an exception is raised. Parameter TMtxType determines which optimized method will be used for calculating the inverse matrix. If MtxType is omitted, the default value mtGeneral (general quadratic matrix) is used.
Note
The MtxType parameter is not verified. To determine if the calling matrix type is actually MtxType, use the Matrix.DetectMtxType method.
var A: Matrix;
begin
A.SetIt(2,2,False,[1,2,
2,4]); // 2x2, real matrix
A.Inv;
end;
Indexed: function Inv(Index: Integer; Len: Integer): TMtxVec;
Calculate the inverse of calling object elements [Index]..[Index+Len-1] in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Integer | start index |
| 2 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
An exception is raised if array borders are overrun/underrun.
var a,b: Matrix;
begin
a.SetIt(2,2,False,[1,2,3,4]); // a = [1, 2, 3, 4]
b.Inv(a,0.01); // b = [1.0, 0.5, 0.3333, 0.25]
b := Inv(a,0.01);
end;
Overload 2: function Inv(MtxType: TMtxType): TMtx;
Compute inverse of the matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | MtxType | TMtxType |
Result: stored in self (calling object), returns self for chaining
Specify the matrix type to select the most performance efficient algorithm.
Overload 3: function Inv(const X: TMtxVec): TMtxVec;
Calculate the inverse of all X object elements without the limiting operating.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec |
Result: stored in self (calling object), returns self for chaining
Store the results in calling object. Size and Matrix.Complex property of calling object are adjusted automatically. Does not compute matrix inverse. The limiting of the magnitude of each element by the lower bound of Threshold is left out.
Indexed: function Inv(const X: TMtxVec; XIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Calculate the inverse of X object elements [XIndex]..[XIndex+Len-1] without limiting operating.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | XIndex | Integer | X start index |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Store the results in calling object elements [Index]..[Index+Len-1]. An exception is raised if X and calling object Matrix.Complex property does not match or array borders are overrun/underrun.
Overload 4: function Inv(const X: TMtxVec; Threshold: Double): TMtxVec;
Calculate the inverse of all X object elements anmd store the results to calling object elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | Threshold | Double | scalar |
Result: stored in self (calling object), returns self for chaining
Size and Matrix.Complex property of calling obhect are adjusted automatically. The computation occurs after first limiting the magnitude of each element by the lower bound of Threshold. The limiting operation is performed to avoid division by zero. Since Threshold represents a magnitude, it is always real and must always be positive.
Note
For complex versions, the magnitude of the input is limited, but the phase remains unchanged. Zero-valued input is assumed to have zero phase.
Indexed: function Inv(const X: TMtxVec; Threshold: Double; XIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Calculate the inverse of X object elements [XIndex]..[XIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVec | |
| 2 | Threshold | Double | scalar |
| 3 | XIndex | Integer | X start index |
| 4 | Index | Integer | start index |
| 5 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Limit the magnitude of each element by the lower bound of Threshold. Store the results in calling object elements [Index]..[Index+Len-1]. An exception is raised if X and calling object Matrix.Complex property do not match or array borders are overrun/underrun.
Overload 5: function Inv(Threshold: Double): TMtxVec;
Calculate the inverse of all calling object elements in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Threshold | Double | scalar |
Result: stored in self (calling object), returns self for chaining
The computation occurs after first limiting the magnitude of each element by the lower bound of Threshold. The limiting operation is performed to avoid division by zero. Since Threshold represents a magnitude, it is always real and must always be positive. For complex versions, the magnitude of the input is limited, but the phase remains unchanged. Zero-valued input is assumed to have zero phase.
Indexed: function Inv(Threshold: Double; Index: Integer; Len: Integer): TMtxVec;
Calculate the inverse of calling object elements [Index]..[Index+Len-1] in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Threshold | Double | scalar |
| 2 | Index | Integer | start index |
| 3 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Limit the magnitude of each element by the lower bound of Threshold. An exception is raised if array borders are overrun/underrun.