template<class TKey, class TDat>
class TSparseOps< TKey, TDat >
Definition at line 544 of file linalg.h.
template<class TKey , class TDat >
Definition at line 548 of file linalg.h.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), and TVec< TVal, TSizeTy >::Len().
Referenced by TLinAlg::AddVec().
550 const int Src1Len = SrcV1.Len();
551 const int Src2Len = SrcV2.Len();
552 int Src1N = 0, Src2N = 0;
553 while (Src1N < Src1Len && Src2N < Src2Len) {
554 if (SrcV1[Src1N].Key < SrcV2[Src2N].Key) {
555 DstV.Add(SrcV1[Src1N]); Src1N++;
556 }
else if (SrcV1[Src1N].Key > SrcV2[Src2N].Key) {
557 DstV.Add(SrcV2[Src2N]); Src2N++;
563 while (Src1N < Src1Len) { DstV.Add(SrcV1[Src1N]); Src1N++; }
564 while (Src2N < Src2Len) { DstV.Add(SrcV2[Src2N]); Src2N++; }