Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVec Size(TMtxVec Src) | Size the object. |
| 2 | TMtxVec Size(TMtxVec Src, Boolean AComplex) | Allows the complex property of the calling object to become of AComplex value instead of Src.Complex value. |
| 3 | TMtx Size(Int32 ARows, Int32 ACols) | Sets the size of matrix. |
| 4 | TMtx Size(Int32 ARows, Int32 ACols, TMtxFloatPrecision aFloatPrecision) | Specifies size of the matrix. |
| 5 | TMtx Size(Int32 ARows, Int32 ACols, Boolean AComplex) | Sets the size of matrix. |
| 6 | TMtx Size(Int32 ARows, Int32 ACols, Boolean AComplex, Boolean aIsDouble) | Sets the size of matrix. |
| 7 | TMtx Size(Int32 ARows, Int32 ACols, TMtxVec aFloatPrecisionRef) | Specifies size of the matrix. |
Overload 1: TMtxVec Size(TMtxVec Src)
Size the object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | source TVec or TMtx |
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 Dew.Math.Matrix.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.
Overload 2: TMtxVec Size(TMtxVec Src, Boolean AComplex)
Allows the complex property of the calling object to become of AComplex value instead of Src.Complex value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | source TVec or TMtx |
| 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.
Overload 3: TMtx Size(Int32 ARows, Int32 ACols)
Sets the size of matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ARows | Int32 | |
| 2 | ACols | Int32 |
Result: stored in self (calling object), returns self for chaining
Set the calling matrix properties:
Dew.Math.Matrix.Rows = ARows, Dew.Math.Matrix.Cols = ACols and See cref="Complex"/> = false.
Existing floating point precision is preserved. Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.
Overload 4: TMtx Size(Int32 ARows, Int32 ACols, TMtxFloatPrecision aFloatPrecision)
Specifies size of the matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ARows | Int32 | |
| 2 | ACols | Int32 | |
| 3 | aFloatPrecision | TMtxFloatPrecision |
Result: stored in self (calling object), returns self for chaining
Set the following matrix properties:
Dew.Math.Matrix.Rows = ARows, Dew.Math.Matrix.Cols = ACols and See cref="FloatPrecision"/> = aFloatPrecision.
Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.
Overload 5: TMtx Size(Int32 ARows, Int32 ACols, Boolean AComplex)
Sets the size of matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ARows | Int32 | |
| 2 | ACols | Int32 | |
| 3 | AComplex | Boolean |
Result: stored in self (calling object), returns self for chaining
Set the calling matrix properties:
Dew.Math.Matrix.Rows = ARows, Dew.Math.Matrix.Cols = ACols and See cref="Complex"/> = AComplex.
Existing floating point precision is preserved. Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.
Overload 6: TMtx Size(Int32 ARows, Int32 ACols, Boolean AComplex, Boolean aIsDouble)
Sets the size of matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ARows | Int32 | |
| 2 | ACols | Int32 | |
| 3 | AComplex | Boolean | |
| 4 | aIsDouble | Boolean |
Result: stored in self (calling object), returns self for chaining
Set the calling matrix properties:
Dew.Math.Matrix.Rows = ARows, Dew.Math.Matrix.Cols = ACols and See cref="Complex"/> = AComplex.
Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.
The floating point precision is defined with aIsDouble.
Note
The Size method performs an out-of-memory safe resize, if the matrix already has memory allocated. This prevents out of memory message for example when redefining the size of the matrix from single column to single row:
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
Matrix A;
A.Size(2,1,true, true); // 2x1 complex double matrix
A.SetZero;
// A becomes:
// [0,0]
// [0,0]
Overload 7: TMtx Size(Int32 ARows, Int32 ACols, TMtxVec aFloatPrecisionRef)
Specifies size of the matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ARows | Int32 | |
| 2 | ACols | Int32 | |
| 3 | aFloatPrecisionRef | TMtxVec | source TVec or TMtx |
Result: stored in self (calling object), returns self for chaining
Set the following matrix properties:
Dew.Math.Matrix.Rows = ARows, Dew.Math.Matrix.Cols = ACols and See cref="FloatPrecision"/> = aFloatPrecisionRef.FloatPrecision.
Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.