Overload List
Overload 1: Matrix(TMtx *Src);
Uses Src object as internal storage.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtx * |
The resulting Matrix will own Src object of TMtx type and will release it once Matrix gets out of scope.
Overload 2: Matrix(const int aRows, const int aCols, const bool aIsComplex, const bool aIsDouble);
Internally creates TMtx object without using object cache.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aRows | const int | |
| 2 | aCols | const int | |
| 3 | aIsComplex | const bool | |
| 4 | aIsDouble | const bool |
Creates TMtx object without using object cache. Suitable for declaring global variables. To obtain Matrix type with storage from object cache, do not call the constructor, but simply declare the var.
Overload 3: Matrix(const int aRows, const int aCols, const TMtxFloatPrecision aFloatPrecision);
Matrix constructor.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aRows | const int | |
| 2 | aCols | const int | |
| 3 | aFloatPrecision | const TMtxFloatPrecision |
Overload 4: Matrix(const int aRows, const int aCols, TMtxVec *aFloatPrecisionRef);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aRows | const int | |
| 2 | aCols | const int | |
| 3 | aFloatPrecisionRef | TMtxVec * |
Overload 5: Matrix(const int aRows, const int aCols);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aRows | const int | |
| 2 | aCols | const int |
Overload 6: Matrix(const int aRows, const int aCols, const bool aIsComplex);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aRows | const int | |
| 2 | aCols | const int | |
| 3 | aIsComplex | const bool |
Overload 7: Matrix(bool FromObjectCache);
Constructor of the record.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | FromObjectCache | bool |
Returns a Matrix with internal TMtx object created from object cache (CreateIt), if FromObjectCache is True. Pass false to the constructor, if the variable is a global variable. Object cache has limited size and to be used only for local variables.
Overload 8: Matrix();
Overload 9: Matrix(const Matrix &aSrc);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aSrc | const Matrix & |
Overload 10: Matrix(std::initializer_list<std::initializer_list<double>> aRows);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aRows | std::initializer_list<std::initializer_list<double>> |
Overload 11: Matrix(std::initializer_list<std::initializer_list<TCplx>> aRows);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | aRows | std::initializer_list<std::initializer_list<TCplx>> |
Overload 12: Matrix(const DewArray2D<double> &AValue);
Implicit type conversion from an array of double to Vector.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AValue | const DewArray2D<double> & |
Copies array and resizes resulting matrix. Example of usage in Delphi XE7 and newer:
var a: Matrix;
arr: T2DDoubleArray; begin
am := [[1,2],[3,4]]; //Embedding means "row" concatenation arr := [[1,2],[3,4]]; am := arr;
am := [[1,2],[3,4]] + [[1,2],[3,4]]; //the "+" here is "row concatenation" // a := [[1,2.2],[3,4]] + a; //operator not applicable (it wont compile), ambiguous math or concat operation end;
Overload 13: Matrix(const DewArray<double> &AValue);
Implicit type conversion from an array of double to Matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AValue | const DewArray<double> & |
Copies array, but does not resize resulting matrix. Example of usage in Delphi XE7 and newer:
var a: Matrix;
begin
a.Size(2,2);
a := [1,2,3,4]; //same as a = [[1,2],[3,4]] end;
Overload 14: Matrix(const DewArray2D<TCplx> &AValue);
Implicit type conversion from an array of double to Vector.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AValue | const DewArray2D<TCplx> & |
Copies array and resizes resulting matrix. Example of usage in Delphi XE7 and newer:
var a: Matrix;
arr: T2DCplxArray;
begin
am := [[Cplx(1,2)],[Cplx(3,4)]]; //Embedding means "row" concatenation arr := [[Cplx(1,2)],[Cplx(3,4)]]; am := arr;
am := [[Cplx(1,2)],[Cplx(3,4)]] + [[Cplx(1,2)],[Cplx(3,4)]]; //the "+" here is "row concatenation" // a := [[Cplx(1,2.2)],[Cplx(3,4)]] + a; //operator not applicable (it wont compile), ambiguous math or concat operation end;
Overload 15: Matrix(const DewArray<TCplx> &AValue);
Implicit type conversion from an array of double to Matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AValue | const DewArray<TCplx> & |
Copies array, but does not resize resulting matrix. Example of usage in Delphi XE7 and newer:
var a: Matrix;
begin
a.Size(2,2, mvDoubleComplex); a := [Cplx(1),Cplx(2),Cplx(3),Cplx(4)]; //same as a = [[Cplx(1),Cplx(2)],[Cplx(3),Cplx(4)]], but only if the size does not change end;