Summary
Defines a sub vector/matrix.
Class
TMtxVec
Declaration
Procedure SetSubRange(Index: integer; Len: integer);
Description
The method will define a subarray starting at Index and ending at Index+Len-1. No copying will occur, only pointers will be shifted. All values of the original TMtxVec 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 SetFullRange
Declaration
Procedure SetSubRange;
Description
Sets the subarray size to full size. This method is the same as the
SetFullRange method.
| Copyright 2008 Dew Research |
http://www.dewresearch.com