Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TVec DownSample(TMtxVec Src, Int32 Factor, Int32 Phase) | Downsamples vector values. |
| 2 | TMtxVec 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.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | source TVec or TMtx |
| 2 | Factor | Int32 | |
| 3 | Phase | Int32 |
Result: stored in self (calling object), returns self for chaining
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.
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}
Overload 2: TMtxVec DownSample(TMtxVec Src, Int32 Factor, Int32 SrcIndex, Int32 Index, Int32 Len, Int32 Phase)
Downsamples object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | source TVec or TMtx |
| 2 | Factor | Int32 | |
| 3 | SrcIndex | Int32 | source start index |
| 4 | Index | Int32 | start index |
| 5 | Len | Int32 | element count |
| 6 | Phase | Int32 |
Result: stored in self (calling object), returns self for chaining
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.