Vector.UpSample Method

Overload List

#SignatureDescription
1TVec UpSample(TMtxVec Src, Int32 Factor, Int32 Phase)Inserts zeroes between consecutive vector values.
2TMtxVec UpSample(TMtxVec Src, Int32 Factor, Int32 SrcIndex, Int32 Index, Int32 Len, Int32 Phase)Inserts zeroes between consecutive array values.

Overload 1: TVec UpSample(TMtxVec Src, Int32 Factor, Int32 Phase)

Inserts zeroes between consecutive vector values.

#NameTypeDescription
1SrcTMtxVecsource TVec or TMtx
2FactorInt32
3PhaseInt32

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

Remarks:

Inserts zeroes between consecutive vector values. The method copies the values from Src to the calling vector and places Factor-1 zeros between consecutive values. The Dew.Math.Vector.Length and Dew.Math.Vector.Complex properties of the calling vector are set implicitly. Phase parameter defines the initial sample offset and must be less than Factor.

Examples
Vector a;
Vector b;
b.SetIt(false,new double[] {0,0,1,3,2});
a.UpSample(b,2); // a = new double[] {0,0,0,0,1,0,3,0,2,0}
See Also: Vector.PixelDownSample, Vector.DownSample, Vector.UpSample

Overload 2: TMtxVec UpSample(TMtxVec Src, Int32 Factor, Int32 SrcIndex, Int32 Index, Int32 Len, Int32 Phase)

Inserts zeroes between consecutive array values.

#NameTypeDescription
1SrcTMtxVecsource TVec or TMtx
2FactorInt32
3SrcIndexInt32source start index
4IndexInt32start index
5LenInt32element count
6PhaseInt32

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

Remarks:

Copy Len values from Src starting at SrcIndex to the calling object starting at position Index and place Factor-1 zeros between consecutive values. Size and Dew.Math.Vector.Complex properties of the calling object must be set explicitly. Phase parameter defines the initial sample offset and must be less then Factor. An exception is raised, if array borders are overrun/underrun.

See Also: Vector.DownSample