You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameter_list type already supports complex variables via the set and get_any methods. The only missing piece is specific get methods for complex arguments. This is trivial to add.
Adding support for complex data to parameter_list_json is more difficult as JSON has no intrinsic notion of complex numbers. I see two options (not necessarily exclusive):
Represent complex data as a structure, such as {re: 1.0, im: 2.0};
Represent complex data as an array of size 2 [1.0, 2.0].
The main difference between the two is on where the capability is implemented.
In option 1, the parameter list reader will need to examine each sublist it reads, and when it finds this special structure, replace the sublist with a complex-valued parameter. No change is needed to parameter_list.
With option 2, no change to the parameter list reader is needed. Instead the parameter_list%get method for complex arguments needs to be extended to allow a size-2 array to be mapped to a complex value.
Add support for complex-valued parameters.
The text was updated successfully, but these errors were encountered: