TOpenCLMtxVec PowerSpectrum(TOpenCLMtxVec Vec)
The power spectrum from object complex values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object), returns self for chaining
Calculates the power spectrum from the Vec object complex values and stores the results (power spectrum) in the real calling object. Size and Dew.Math.TOpenCLBase.Complex properties of the calling object are set implicitly to match Vec object. The spectrum elements are squares of the magnitudes of the complex input elements:
clMatrix a;
clMatrix b;
a.CopyCplxFromArray(1,2,TSingleArray.Create(1,2,3,-4)); // a = [1 + 2i, 3 - 4i]
b.PowerSpectrum(a); // b = [1*1 + 2*2, 3*3+(-4)*(-4)]
Indexed: TOpenCLMtxVec PowerSpectrum(TOpenCLMtxVec Vec, Int32 VecIndex, Int32 Index, Int32 Len)
Calculates the power spectrum from the Vec complex elements [VecIndex]..[VecIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | VecIndex | Int32 | |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Store the results in calling object real elements [Index]..[Index+Len-1]. An exception is raised if calling object Dew.Math.TOpenCLBase.Complex property is true or if array borders are overrun/underrun.