Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void SetSubIndex(Int32 BeginIndex, Int32 EndIndex) | Defines a subarray. |
| 2 | void SetSubIndex(TMtxVecInt Src, Int32 BeginIndex, Int32 EndIndex) | Defines a sub-vector. |
Overload 1: void SetSubIndex(Int32 BeginIndex, Int32 EndIndex)
Defines a subarray.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | BeginIndex | Int32 | |
| 2 | EndIndex | Int32 |
Result: stored in self (calling object)
The method will define a sub array starting at BeginIndex and ending at EndIndex (inclusive). All values of the original vector/matrix will be preserved. An exception will be raised if an attempt is made to change the size of calling vector/matrix.
A subarray is array which does not 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 subarrays increases CPU cache reuse, lower's memory requirements, increases application performance and improves code readability.
To again obtain a view of the full vector see Dew.Math.TMtxVecBase.SetFullRange
Overload 2: void SetSubIndex(TMtxVecInt Src, Int32 BeginIndex, Int32 EndIndex)
Defines a sub-vector.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt | source TVecInt or TMtxInt |
| 2 | BeginIndex | Int32 | |
| 3 | EndIndex | Int32 |
Result: stored in self (calling object)
Define a subvector of the Src vector starting at BeginIndex and ending at EndIndex (inclusive).