Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Vector(TVec Src) | Uses TVec object as internal storage. |
| 2 | Vector(Boolean FromObjectCache) | Constructor of the record. |
| 3 | Vector(Int32 ALength, TMtxFloatPrecision aFloatPrecision) | Internally creates TVec object without using object cache. |
| 4 | Vector(Int32 ALength, Boolean aIsComplex, Boolean aIsDouble) | Constructor of the record. |
Overload 1: Vector(TVec Src)
Uses TVec object as internal storage.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TVec | source TVec |
Result: stored in self (calling object)
The resulting Vector will own Src object of TVec type and will release it once Vector gets out of scope.
Overload 2: Vector(Boolean FromObjectCache)
Constructor of the record.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | FromObjectCache | Boolean |
Result: stored in self (calling object)
Returns a Vector with internal TVec 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 is to be used only for local variables.
Overload 3: Vector(Int32 ALength, TMtxFloatPrecision aFloatPrecision)
Internally creates TVec object without using object cache.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ALength | Int32 | |
| 2 | aFloatPrecision | TMtxFloatPrecision |
Result: stored in self (calling object)
Creates TVec object without using object cache. Suitable for declaring global variables.
Overload 4: Vector(Int32 ALength, Boolean aIsComplex, Boolean aIsDouble)
Constructor of the record.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ALength | Int32 | |
| 2 | aIsComplex | Boolean | |
| 3 | aIsDouble | Boolean |
Result: stored in self (calling object)
Returns a Vector with internal TVec object created explicitely with Length property set to aLength and Complex property set to IsComplex. Call this constructor, if the Vector type variable is a global variable with a long life span.
Vector a;
Vector b;
TVec bvec;
a = Vector.Create(true); //create from object cache via CreateIt
//this constructor can be omitted, because it is implictely called
//the first time that the variable is used.
//However:
b = Vector.Create(10);
//Similar to
bvec = TVec.Create;
try
{
bvec.Size(10);
}
finally
{
bvec.Free; //b is freed on the exit from the procedure
}