我想将矩阵从应用程序 A(使用 LDU 格式的矩阵)传输到应用程序 B(使用 boost ublascompressed_matrix,CSR 格式)。
我有一个将 LDU 格式转换为 CSR 格式的功能。ldu2csr 函数为我提供了以 CSR 格式存储稀疏矩阵所需的三个数组(可以在此处找到 CSR 格式的详细信息:compressed_matrix in boost 分配的空间): ... values[idx] = matrix.upper()[i ]; cols[idx] = 列;行[行]++;
如何将这些数组直接加载到 boost ublascompressed_matrix 的相应数组中?