Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Size(ALength: Integer; aPrecision: TIntPrecision): TVecInt; | Sets the size and storage precision of the calling object. |
| 2 | function Size(const Src: TMtxVecBase): TMtxVecInt; | Size the object. |
| 3 | function Size(const Src: TMtxVecBase; aPrecision: TIntPrecision): TMtxVecInt; | Allows the IntPrecision property of the calling object to become of aPrecision value instead of Src.IntPrecision value. |
Overload 1: function Size(ALength: Integer; aPrecision: TIntPrecision): TVecInt;
Sets the size and storage precision of the calling object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ALength | Integer | |
| 2 | aPrecision | TIntPrecision |
Result: stored in self (calling object), returns self for chaining
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 2: function Size(const Src: TMtxVecBase): TMtxVecInt;
Size the object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecBase |
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 TVecInt object then the Src can be of any type, otherwise TMtxInt can only obtain size from a TMtxInt object and TSparseMtx can only obtain size from a TSparseMtx object.
If the calling object and Src are of different types and both objects have a matching TMtxVecBase.Length property only the IntPrecision property of the calling object will changed, while all other properties describing the size of the object (rows, cols, length) will be preserved.
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 Src: TMtxVecBase; aPrecision: TIntPrecision): TMtxVecInt;
Allows the IntPrecision property of the calling object to become of aPrecision value instead of Src.IntPrecision value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecBase | |
| 2 | aPrecision | TIntPrecision |
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 IntPrecision value. The value of the IntPrecision property can be changed without knowing the actual type of the object.