Matrix::Matrix Constructor

Overload List

#SignatureDescription
1Matrix(TMtx *Src);Uses Src object as internal storage.
2Matrix(const int aRows, const int aCols, const bool aIsComplex, const bool aIsDouble);Internally creates TMtx object without using object cache.
3Matrix(const int aRows, const int aCols, const TMtxFloatPrecision aFloatPrecision);Matrix constructor.
4Matrix(const int aRows, const int aCols, TMtxVec *aFloatPrecisionRef);
5Matrix(const int aRows, const int aCols);
6Matrix(const int aRows, const int aCols, const bool aIsComplex);
7Matrix(bool FromObjectCache);Constructor of the record.
8Matrix();
9Matrix(const Matrix &aSrc);
10Matrix(std::initializer_list<std::initializer_list<double>> aRows);
11Matrix(std::initializer_list<std::initializer_list<TCplx>> aRows);
12Matrix(const DewArray2D<double> &AValue);Implicit type conversion from an array of double to Vector.
13Matrix(const DewArray<double> &AValue);Implicit type conversion from an array of double to Matrix.
14Matrix(const DewArray2D<TCplx> &AValue);Implicit type conversion from an array of double to Vector.
15Matrix(const DewArray<TCplx> &AValue);Implicit type conversion from an array of double to Matrix.

Overload 1: Matrix(TMtx *Src);

Uses Src object as internal storage.

#NameTypeDescription
1SrcTMtx *
Remarks:

The resulting Matrix will own Src object of TMtx type and will release it once Matrix gets out of scope.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 2: Matrix(const int aRows, const int aCols, const bool aIsComplex, const bool aIsDouble);

Internally creates TMtx object without using object cache.

#NameTypeDescription
1aRowsconst int
2aColsconst int
3aIsComplexconst bool
4aIsDoubleconst bool
Remarks:

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.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 3: Matrix(const int aRows, const int aCols, const TMtxFloatPrecision aFloatPrecision);

Matrix constructor.

#NameTypeDescription
1aRowsconst int
2aColsconst int
3aFloatPrecisionconst TMtxFloatPrecision
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 4: Matrix(const int aRows, const int aCols, TMtxVec *aFloatPrecisionRef);

#NameTypeDescription
1aRowsconst int
2aColsconst int
3aFloatPrecisionRefTMtxVec *
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 5: Matrix(const int aRows, const int aCols);

#NameTypeDescription
1aRowsconst int
2aColsconst int
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 6: Matrix(const int aRows, const int aCols, const bool aIsComplex);

#NameTypeDescription
1aRowsconst int
2aColsconst int
3aIsComplexconst bool
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 7: Matrix(bool FromObjectCache);

Constructor of the record.

#NameTypeDescription
1FromObjectCachebool
Remarks:

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.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 8: Matrix();

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 9: Matrix(const Matrix &aSrc);

#NameTypeDescription
1aSrcconst Matrix &
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 10: Matrix(std::initializer_list<std::initializer_list<double>> aRows);

#NameTypeDescription
1aRowsstd::initializer_list<std::initializer_list<double>>
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 11: Matrix(std::initializer_list<std::initializer_list<TCplx>> aRows);

#NameTypeDescription
1aRowsstd::initializer_list<std::initializer_list<TCplx>>
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 12: Matrix(const DewArray2D<double> &AValue);

Implicit type conversion from an array of double to Vector.

#NameTypeDescription
1AValueconst DewArray2D<double> &
Remarks:

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;

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 13: Matrix(const DewArray<double> &AValue);

Implicit type conversion from an array of double to Matrix.

#NameTypeDescription
1AValueconst DewArray<double> &
Remarks:

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;

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 14: Matrix(const DewArray2D<TCplx> &AValue);

Implicit type conversion from an array of double to Vector.

#NameTypeDescription
1AValueconst DewArray2D<TCplx> &
Remarks:

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;

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 15: Matrix(const DewArray<TCplx> &AValue);

Implicit type conversion from an array of double to Matrix.

#NameTypeDescription
1AValueconst DewArray<TCplx> &
Remarks:

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;

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler