Vector.DownSample Method

Overload List

#SignatureDescription
1TVec DownSample(TMtxVec Src, Int32 Factor, Int32 Phase)Downsamples vector values.
2TMtxVec DownSample(TMtxVec Src, Int32 Factor, Int32 SrcIndex, Int32 Index, Int32 Len, Int32 Phase)Downsamples object values.

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

Downsamples vector values.

#NameTypeDescription
1SrcTMtxVecsource TVec or TMtx
2FactorInt32
3PhaseInt32

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

Remarks:

The methods copies only every Factor sample from the Src vector to the calling vector. The Dew.Math.Vector.Length and Dew.Math.Vector.Complex properties of the calling vector are set implicitly. The phase parameter determines the initial sample offset. Phase must be less than Factor.

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

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

Downsamples object 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 only every Factor sample from Src starting at SrcIndex up to Len to the calling object starting at Index. The phase parameter determines the initial sample offset. Phase must be less then Factor. Size and Dew.Math.Vector.Complex properties of the calling object are set implicitly. An exception is raised if array borders are overrun/underrun.

See Also: Vector.UpSample