如何将CSR矩阵直接加载到boost compressed_matrix中?

时间:2017-08-22 09:14:54

标签: c++ c++11 boost ublas boost-ublas

我想将应用程序A中的矩阵(使用LDU格式的矩阵)传输到应用程序B(使用boost ublas compressed_matrix,CSR格式)。

我有一个将LDU格式转换为CSR格式的功能。 ldu2csr函数为我提供了以CSR格式存储稀疏矩阵所需的三个数组(CSR格式详细信息可以在这里找到:space allocated by compressed_matrix in boost):     ...     values [idx] = matrix.upper()[i];     cols [idx] = column;     行[行] ++;

如何将这些数组直接加载到相应的boost ublas compressed_matrix?

0 个答案:

没有答案