TVecByte::SetSubRangeLevel Method

Overload List

#SignatureDescription
1void SetSubRangeLevel(int Index, int Len = MtxVecEOA);Defines a sub vector/matrix and pushes any previous subranges on to a stack.
2void SetSubRangeLevel(TMtxVecBase *Src, int Index, int Len = MtxVecEOA);Defines a sub vector/matrix of Src and pushes any previous subranges on to a stack.

Overload 1: void SetSubRangeLevel(int Index, int Len = MtxVecEOA);

Defines a sub vector/matrix and pushes any previous subranges on to a stack.

#NameTypeDescription
1Indexint
2Len = MtxVecEOAint
Remarks:

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. The routine allows for stack based pushing and poping of sub-ranges with the additional constraint that each deepening of the sub-range is strictly within the bounds of the previous one. The pairs of SetSubRangeLevel/SetFullRangeLevel need to match.

All values of the original TMtxVecBase will be preserved. An exception will be raised, if an attempt is made to change the size of calling object.

It is possible to call SetSubRange/SetFullRange on the object, which has been subranged with SetSubRangeLevel.

To again obtain a view of the previous subrange level on the vector/matrix, call TVecByte::SetFullRangeLevel

The Index parameter of the SetSubRange is absolute for the original memory or current stack level. The Index parameter for the SetSubRangeLevel is relative to the previous SetSubRangeLevel call.

Declared in Dew::Math::TMtxVecBase · Dew.Math/MtxVecBase.h · Cross-compiler

Overload 2: void SetSubRangeLevel(TMtxVecBase *Src, int Index, int Len = MtxVecEOA);

Defines a sub vector/matrix of Src and pushes any previous subranges on to a stack.

#NameTypeDescription
1SrcTMtxVecBase *
2Indexint
3Len = MtxVecEOAint
Remarks:

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. The routine allows for stack based pushing and poping of sub-ranges with the additional constraint that each deepening of the sub-range is strictly within the bounds of the previous one. The pairs of SetSubRangeLevel/SetFullRangeLevel need to match.

All values of the original 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)

It is possible to call SetSubRange/SetFullRange on the object, which has been subranged with SetSubRangeLevel.

To again obtain a view of the previous subrange level on the vector/matrix, call TVecByte::SetFullRangeLevel

The Index parameter of the SetSubRange is always relative to the previous, if any, stack level. The Index parameter for the SetSubRangeLevel is relative to the current stack level.

Declared in Dew::Math::TMtxVecBase · Dew.Math/MtxVecBase.h · Cross-compiler