Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TOpenCLMtxVec PolarToCart(TOpenCLMtxVec AmpltVec, TOpenCLMtxVec PhaseVec) | Converts the polar magnitude/phase pairs to cartesian pairs. |
| 2 | TOpenCLMtxVec PolarToCart(TOpenCLMtxVec AmpltVec, TOpenCLMtxVec PhaseVec, Int32 aIndex, Int32 PIndex, Int32 Index, Int32 Len) | Convert AmpltVec elements [aIndex]..[aIndex+Len-1] and PhaseVec elements [PIndex]..[PIndex+Len-1] from polar form (radius,angle) to cartesian form (x,y). |
Overload 1: TOpenCLMtxVec PolarToCart(TOpenCLMtxVec AmpltVec, TOpenCLMtxVec PhaseVec)
Converts the polar magnitude/phase pairs to cartesian pairs.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AmpltVec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | PhaseVec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object), returns self for chaining
Convert all AmpltVec and PhaseVec elements (combined) from polar to cartesian form. If AmpltVec and PhaseVec size is not the same , an exeption is raised. The results are stored as complex numbers (x=Re, y=Im) in the calling object. Size and Dew.Math.TOpenCLBase.Complex properties of the calling object are set implicitly to match AmpltVec and PhaseVec objects.
clMatrix a;
clMatrix b;
clMatrix c;
a.CopyFromArray(2,2,TSingleArray.Create(1,2,3,4)); // a = new double[] {1,2,3, 4} //magnitude
b.CopyFromArray(2,2,TSingleArray.Create(1,0,1,-1)); // b = new double[] {1,0,1,-1} /phase
c.PolarToCart(a,b); // result stored in c = projections to Re and Im axis
Overload 2: TOpenCLMtxVec PolarToCart(TOpenCLMtxVec AmpltVec, TOpenCLMtxVec PhaseVec, Int32 aIndex, Int32 PIndex, Int32 Index, Int32 Len)
Convert AmpltVec elements [aIndex]..[aIndex+Len-1] and PhaseVec elements [PIndex]..[PIndex+Len-1] from polar form (radius,angle) to cartesian form (x,y).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AmpltVec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | PhaseVec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 3 | aIndex | Int32 | |
| 4 | PIndex | Int32 | |
| 5 | Index | Int32 | start index |
| 6 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
The results are stored as complex numbers (x=Re, y=Im) in the calling object elements [Index]..[Index+Len-1]. Size and Dew.Math.TOpenCLBase.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun/underrun.