Loading src/libnptm/TransitionMatrix.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -235,8 +235,8 @@ void TransitionMatrix::write_hdf5(string file_name) { double *ptr_elements = new double[shape[0] * 2 * shape[1]](); for (int ei = 0; ei < shape[0]; ei++) { for (int ej = 0; ej < shape[1]; ej++) { ptr_elements[ei * (2 * ej)] = elements[shape[1] * ei + ej].real(); ptr_elements[ei * (2 * ej) + 1] = elements[shape[1] * ei + ej].imag(); ptr_elements[shape[1] * ei + 2 * ej] = elements[shape[1] * ei + ej].real(); ptr_elements[shape[1] * ei + 2 * ej + 1] = elements[shape[1] * ei + ej].imag(); } } rec_ptr_list.append(ptr_elements); Loading Loading
src/libnptm/TransitionMatrix.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -235,8 +235,8 @@ void TransitionMatrix::write_hdf5(string file_name) { double *ptr_elements = new double[shape[0] * 2 * shape[1]](); for (int ei = 0; ei < shape[0]; ei++) { for (int ej = 0; ej < shape[1]; ej++) { ptr_elements[ei * (2 * ej)] = elements[shape[1] * ei + ej].real(); ptr_elements[ei * (2 * ej) + 1] = elements[shape[1] * ei + ej].imag(); ptr_elements[shape[1] * ei + 2 * ej] = elements[shape[1] * ei + ej].real(); ptr_elements[shape[1] * ei + 2 * ej + 1] = elements[shape[1] * ei + ej].imag(); } } rec_ptr_list.append(ptr_elements); Loading