I'm creating a project to filter signals. At present, it only takes real input values, however, to do the filtering using the alglib
library it needs to take alglib::complex
types. Therefore the double[]
input needs to be converted
In the reference manual its states these are double precision complex types. Is there a way to simply copy the data across - as the only alternative seems to be allocating elementwise, or creating a very large string and allocating directly to the complex array.
Two methods I have found of allocating to an array so far include;
alglib::complex complex_arr = "[3, 2, 1]"; //Method 1 string assignment
for (int i = 0; i < array_size; i++) { //Method 2 elementwise assignment
complex_arr[i] = (complex) double_arr[i];
}