This class would be a wrapper class similar to gpuArray. The class would have an
internal data type which could be queried and changed.
Implementation would be time consuming, we would need to overload almost every builtin matlab method which can be applied to logical, double, complex and gpuArray objects. There are a lot!
https://au.mathworks.com/help/matlab/referencelist.html
This would make a slightly nicer user interface and would handle the problem of keeping track of the phase range of patterns. However, perhaps it is better to wait and see if we write a python version.
Perhaps all patterns should be a single data type, perhaps complex. This would not be very efficient for binary patterns, or amplitude/phase only patterns.
This class would be a wrapper class similar to gpuArray. The class would have an internal data type which could be queried and changed.
Implementation would be time consuming, we would need to overload almost every builtin matlab method which can be applied to logical, double, complex and gpuArray objects. There are a lot! https://au.mathworks.com/help/matlab/referencelist.html
This would make a slightly nicer user interface and would handle the problem of keeping track of the phase range of patterns. However, perhaps it is better to wait and see if we write a python version.