I.4.9.5 Assembling Complex from Real Results
The “assembleComplex” method is used to assemble a Complex Result object from two Real Results. The method is called on a Result object and has three arguments:
- 1.
-
An integer corresponding to the format of the new Complex Result. The accepted values are 2 (real-imaginary or rectangular format) or 3 (polar or magnitude-phase format).
- 2.
-
A first Result object that will correspond to the real or magnitude components of the assembled Result.
- 3.
-
A second Result object that will correspond to the imaginary or phase components of the assembled Result.
Note that the two Result arguments must satisfy several requirements:
-
They must be Real Results.
-
They must have the same number of key-values pairs, with exact key matches.
-
Their values must have the same number of components.
-
When one pair of value objects are merged, their Coordinate System IDs must be the same.
An example of valid (but not very useful) call to “assembleComplex” follows:
resR=res2.getR resI=res2.getI resRI=Result.new resRI.assembleComplex(2,resR,resI)