Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Size(const Src: TMtxVec): TMtxVec; | Size the object. |
| 2 | function Size(const Src: TMtxVec; AComplex: Boolean): TMtxVec; | Also allows the complex property of the calling object to become of AComplex value instead of Src.Complex value. |
| 3 | function Size(const ALength: Integer; const aFloatPrecision: TMtxFloatPrecision): TVec; | Sets the following properties: |
| 4 | procedure Size(const ALength: Integer; const aIsComplex: Boolean; const aIsDouble: Boolean); | Sets the following properties |
Overload 1: function Size(const Src: TMtxVec): TMtxVec;
Size the object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec |
Result: stored in self (calling object), returns self for chaining
Assignes the size of the Src object to the calling object. If the calling object is a TVec object then the Src can be of any type, otherwise TMtx can only obtain size from a TMtx object and TSparseMtx can only obtain size from a TSparseMtx object.
If the calling object and Src are of different types, the complex property can be different, if both objects have a matching Vector.Length property. In this case only the Complex property of the calling object will changed, while all other properties describing the size of the object (rows, cols, length, nonZeros) will be preserved. This is different from simply setting the Complex property. Changing the Complex property directly would also change the Length, Cols and NonZeros properties.
Vec.Length := ALength;
Vec.Complex := false;
Overload 2: function Size(const Src: TMtxVec; AComplex: Boolean): TMtxVec;
Also allows the complex property of the calling object to become of AComplex value instead of Src.Complex value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | |
| 2 | AComplex | Boolean |
Result: stored in self (calling object), returns self for chaining
It is also possible to pass the calling object as the Src with a different AComplex value. The value of the complex property can be changed without knowing the actual type of the object.
A.Rows := 10000; // matrix size = 0
A.Cols := 1; // matrix size = 10000
// ...
A.Cols := 10000; // matrix size = 100 000 000 (problems here)
A.Rows := 1; // matrix size = 10 000
Overload 3: function Size(const ALength: Integer; const aFloatPrecision: TMtxFloatPrecision): TVec;
Sets the following properties:
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ALength | Integer | |
| 2 | aFloatPrecision | TMtxFloatPrecision |
Result: stored in self (calling object), returns self for chaining
Vec.Length := ALength; Vec.Complex := false;
Overload 4: procedure Size(const ALength: Integer; const aIsComplex: Boolean; const aIsDouble: Boolean);
Sets the following properties
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ALength | Integer | |
| 2 | aIsComplex | Boolean | |
| 3 | aIsDouble | Boolean |
Result: stored in self (calling object)
Vec.Length := ALength; Vec.Complex := AComplex;
Vec.Length := ALength;
Vec.Complex := AComplex;