You are here: Symbol Reference > MtxVec Namespace > Classes > TVec Class > public > TVec.GatherSplit Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TVec.GatherSplit Method

Gather a vector, split to two vectors.

Pascal
function GatherSplit(const MaskVec: TMtxVec; const NotMaskVec: TMtxVec; const Mask: TVecInt): TVec; overload;

If the elements of a vector have been split with a Mask and the "positive" elements have been stored in the MaskVec and "negative" elements have been stored in the NotMaskVec, this routine will restore the original vector. 

The Mask vector stores the mask as Integers in to the memory location occupied by Values array. The memory is typecasted to an array of integers via IValues pointer. Other TVec methods can not be used to perform operations on an array of integers unless explicitly specified. 

The length of the MaskVec vector must be equal to the number of ones in the Mask vector. The length of the NotMaskVec vector must be equal to the number of zeroes in the Mask vector.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!