在Linux中寻找一个用于高效计算大型稀疏矩阵的C / C ++接口 [英] Looking for a C/C++ interface for efficient computation of huge sparse matrix in Linux

查看:142
本文介绍了在Linux中寻找一个用于高效计算大型稀疏矩阵的C / C ++接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个C / C ++接口,用于在Linux中高效计算大型稀疏矩阵。矩阵可以是百万计数百万/千。我已经检查了一些现有的库,但似乎没有一个满足我的所有要求,

I am looking for a C/C++ interface for efficient computation of huge sparse matrix in Linux. The matrix could be of millions times millions/thousands. I have checked a few existing libraries, but it seems none of them satisfies all of my requirements,

1,我需要通过动态添加元素创建一个稀疏矩阵。 (不是为SparseLib ++)

1, I need to create a sparse matrix by dynamically adding elements to it. (not for SparseLib++)

2,我还需要能够创建一个稀疏的对角矩阵,以便我可以缩放另一个稀疏矩阵的列与不同的标量。 (没有找到这个库,也许有另一种方法来缩放稀疏矩阵的列)

2, I also need to be able to create a sparse diagonal matrix so that I can scale the columns of another sparse matrix with different scalars. (didn't find a library for this, and maybe there is another way to scale the sparse matrix by columns)

3,它需要支持矩阵乘法与矩阵/向量(许多库支持这些基本操作)

3, It needs to support the operations of matrix multiplied with matrix/vector (Many libraries support these basic operations)

4,它需要支持两个稀疏矩阵或向量之间的入口乘法或除法, ./在MATLAB(没有找到一个库,我需要这个操作来筛选出一个稀疏矩阵的一些条目与另一个稀疏矩阵)

4, It needs to support entry-wise multiplication or division between two sparse matrices or vectors, like .* or ./ in MATLAB (didn't find a library for this, and I need this operation to screen out some entries of one sparse matrix with another sparse matrix)

5,矩阵求逆或线性求解器。 (大多数库提供线性系统的解算器)

5, Matrix inversion or linear solver. (Most libraries provide the solver for linear system)

我最初使用Python中的scipy来实现我的算法。 Python消耗了太多的内存,它很慢,这就是为什么我想把我的程序转换为C。

I originally made use of scipy in Python to implement my algorithm. Python consumes too much memory and it is slow, and that's why I'd like to convert my program into C.

谢谢。

推荐答案

我会推荐CS Davin的CSparse。

I would recommend CSparse by Tim Davis.

这篇关于在Linux中寻找一个用于高效计算大型稀疏矩阵的C / C ++接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆