Vector.GatherSplit Method

TVec GatherSplit(TMtxVec MaskVec, TMtxVec NotMaskVec, TVecInt Mask)

Gather a vector, split to two vectors.

#NameTypeDescription
1MaskVecTMtxVecsource TVec or TMtx
2NotMaskVecTMtxVecsource TVec or TMtx
3MaskTVecIntsource TVecInt

Result: stored in self (calling object), returns self for chaining

Remarks:

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 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.

See Also: AbstractMtxVec.FindAndSplit