VectorInt.Size Method

Overload List

#SignatureDescription
1function Size(const Src: TMtxVecBase): TMtxVecInt;Size the object.
2function Size(const ALength: Integer): TVecInt;Sets the following properties
3procedure Size(const ALength: Integer; const aPrecision: TIntPrecision);Sets the following properties

Overload 1: function Size(const Src: TMtxVecBase): TMtxVecInt;

Size the object.

#NameTypeDescription
1SrcTMtxVecBase

Result: stored in self (calling object), returns self for chaining

Remarks:

Assigns the size of the Src object to the calling object. If both objects have a matching VectorInt.Length property, only the VectorInt.IntPrecision property of the calling object will changed, while all other properties describing the size of the object will be preserved.

Examples
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 ALength: Integer): TVecInt;

Sets the following properties

#NameTypeDescription
1ALengthInteger

Result: stored in self (calling object), returns self for chaining

Remarks:
Vec.Length := ALength;

and preserves IntPrecision value. Default IntPrecision when object is created is prInt32.

Examples
Vec.Length := ALength;

Overload 3: procedure Size(const ALength: Integer; const aPrecision: TIntPrecision);

Sets the following properties

#NameTypeDescription
1ALengthInteger
2aPrecisionTIntPrecision

Result: stored in self (calling object)

Remarks:
Vec.Precision := aPrecision;
Vec.Length := ALength;
Examples
Vec.Precision := aPrecision;
Vec.Length := ALength;