良好的线性代数软件包 [英] Good Linear Algebra Package

查看:168
本文介绍了良好的线性代数软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我采取一些频谱图算法的一个项目。这方面的一个很大一部分是找到特征值和大,稀疏矩阵的特征向量,以及乘矩阵。

I am implementing some spectral graph algorithms for a project. A large part of this is finding eigenvalues and eigenvectors of large, sparse matrices, as well as multiplying matrices.

我的问题是,什么是做到这一点的最快库?我一直在看NumPy的使用Python或JAMA的Java。这些是很好的,或者是有什么好?

My question is, what are the fastest libraries that do this? I've been looking at NumPy for Python or JAMA for Java. Are these good, or is there something better?

感谢你。

推荐答案

首先,你需要指定正是你需要执行哪些矩阵运算。其原因是,一些库非常擅长一些特殊的操作。作为一个例子ARPACK是善于发现大稀疏矩阵的最大特征值少。 (见我的问题上)

First of all you need to specify exactly which matrix operations you need to perform. The reason is that some of the libraries are very good at a few special operations. As an example Arpack is good at finding the largest few eigenvalues of a large sparse matrix. (See my questions above)

但总的来说与NumPy / SciPy的是一个不错的选择。它包装一些库,如LAPACK,ARPACK和superLU,它给你一个很好的Python接口的工作。

But in general NumPy/SciPy is a good choice. It wraps several libraries such as lapack, arpack, and superLU and it gives you a nice python interface to work with.

另外,您可以用倍频程或MATLAB或使用C ++来包装的专业,你需要执行的操作的库。

Alternatively you can use octave or MATLAB or use c++ to wrap a library that is specialized in the operations that you need to perform.

贾马是构建密集矩阵,并且要与稀疏矩阵工作,所以贾马对你是一个不错的选择。 http://math.nist.gov/javanumerics/jama/

Jama was build for dense matrices, and you want to work with sparse matrices, so Jama is a bad choice for you. http://math.nist.gov/javanumerics/jama/

编辑: 我不是这一切的专家,但据我所知,你需要找到一个使用的Lanczos算法库(http://en.wikipedia.org/wiki/Lanczos_algorithm)

I am not an expert on all this, but as far as I know you need to find a library that uses Lanczos algorithm (http://en.wikipedia.org/wiki/Lanczos_algorithm )

该ARPACK库使用这个算法,所以ARPACK是一个不错的选择。 Python库scipy.sparse.linalg包装ARPACK,所以SciPy的也是一个不错的选择。

The Arpack library uses this algorithm, so Arpack is a good choice. The python library scipy.sparse.linalg wraps Arpack, so scipy is also a good choice.

有关记录LAPACK也为密集矩阵创建,所以LAPACK是一个不错的选择,除非你的矩阵是如此之小,速度也没有关系。我相信,EISPACK是已经过时了多年。

For the record Lapack was also created for dense matrices, so Lapack is a bad choice unless your matrices are so small that speed doesn't matter. I believe that eispack is been outdated for years.

这篇关于良好的线性代数软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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