C ++的稀疏矩阵库 [英] sparse matrix library for C++

查看:107
本文介绍了C ++的稀疏矩阵库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在可以执行以下操作的稀疏矩阵库:

Is there any sparse matrix library that can do these:

  • 求解线性代数方程
  • 支持诸如矩阵矩阵/数乘法/加法/减法,矩阵转置,获取矩阵的行/列等操作
  • 矩阵大小可以为40k * 40k或更大,例如250k * 250k
  • 快速
  • 可以在Windows中使用

有人可以为我推荐一些图书馆吗? 如果您推荐,请告诉我它的优缺点,以及推荐它的原因.

Can someone recommend some libraries for me? If you recommend, please tell me the advantages and disadvantages of it, and the reason why you recommend it.

顺便说一句,我已经在互联网上搜索了许多稀疏矩阵库并对其进行了测试.我发现它们每个仅支持很少的运算(它们中的许多只能求解线性代数方程式并执行矩阵向量乘法).最后,我找到了一个名为SparseLib ++的运算符.它也不支持很多操作,因此我添加了很多基本的矩阵操作.现在可以了.但是,我只是听说SparseLib ++太旧了而且不够快.但是我的项目基于SparseLib ++,我在SparseLib ++上花费了很多工作.因此,我想知道是否尝试另一个稀疏矩阵库.

By the way,I have searched many sparse matrix libraries on the internet and tested some of them. I found that each of them only supported very few operations(many of them can only solve linear algebraic equations and do matrix-vector multiplication) .Finally I found one named SparseLib++. It didn't support many operations, either.So I added a lot of basic matrix operations. Now it works. However, I just heard that SparseLib++ was too old and not fast. But my project is based on SparseLib++ and I have spent a lot of work on SparseLib++. So I am wondering whether to try another sparse matrix library or not.

推荐答案

http://www. mcs.anl.gov/petsc/具有很多内置的线性代数,并且当您的数据变大时,可以在整个集群上分配矩阵.遇到技术问题时, https://scicomp.stackexchange.com/上也会有很多关注者.缺点是学习曲线有点陡峭.

http://www.mcs.anl.gov/petsc/ has a lot of built in linear algebra and ca distribute matrices over a cluster when your data gets big. There's also an active following on https://scicomp.stackexchange.com/ when you have technical questions. The downside is that the learning curve is a bit steep.

这篇关于C ++的稀疏矩阵库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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