Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void SetSubRange | Sets the subarray size to full size. |
| └ indexed: void SetSubRange(Int32 Index, Int32 Len) | ||
| 2 | void SetSubRange(TMtxVecBase Src, Int32 Index, Int32 Len) | Define a subvector of the Src vector. |
Overload 1: void SetSubRange
Sets the subarray size to full size.
Result: stored in self (calling object)
This method is the same as the Dew.Math.TMtxVecBase.SetFullRange method.
Indexed: void SetSubRange(Int32 Index, Int32 Len)
Defines a sub vector/matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Result: stored in self (calling object)
The method will define a subarray starting at Index and ending at Index+Len-1. No copying will occur, only pointers will be shifted or indices adjusted.
All values of the original Dew.Math.TMtxVecBase will be preserved. An exception will be raised, if an attempt is made to change the size of calling object.
A sub-vector/matrix is vector/matrix which does not neccessarily have its own memory allocated. Instead it adopts the memory of the source object and all operations done on the either of the objects affect the same elements. The use of subvectors/submatrices increases CPU cache reuse, lower's memory requirements, increases application performance and improves code readability.
To again obtain a view of the full vector/matrix, see Dew.Math.TMtxVecBase.SetFullRange
Overload 2: void SetSubRange(TMtxVecBase Src, Int32 Index, Int32 Len)
Define a subvector of the Src vector.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecBase | source TVec, TMtx, TVecInt or TMtxInt |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object)
The method will define a subarray starting at Index and ending at Index+Len-1 of Src. No copying will occur, only pointers will be shifted or indices adjusted.
A sub-vector/matrix is vector/matrix which does not neccessarily have its own memory allocated. Instead it adopts the memory of the source object and all operations done on the either of the objects affect the same elements. The use of subvectors/submatrices increases CPU cache reuse, lower's memory requirements, increases application performance and improves code readability.
All values of the original Dew.Math.TMtxVecBase will be preserved. An exception will be raised, if an attempt is made to change the size of calling object. No exception will be raised, if Src is resized while subranged. (possibly leading to memory overwrites)
To again obtain a view of the original vector/matrix, call Dew.Math.TMtxVecBase.SetFullRange