arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv cs/0604006cs.MS
收藏

稀疏矩阵的倍频程实现

Sparse Matrix Implementation in Octave

David Bateman, Andy Adler

摘要:

有许多类的数学问题会产生矩阵,其中大量的元素为零。在这种情况下,有一个特殊的矩阵类型来处理这类只存储矩阵的非零元素的问题是有意义的。这不仅减少了存储矩阵的内存量,而且还意味着对这种类型的矩阵的操作可以利用非零元素位置的先验知识来加速它们的计算。只存储非零元素的矩阵类型通常称为稀疏矩阵。直到最近,Octave还缺乏稀疏矩阵的完整实现。本文讨论了稀疏矩阵在Octave中的实现,包括它们的存储,创建,使用的基本算法,它们的实现以及为稀疏矩阵实现的基本操作和功能。在一个实例中讨论了稀疏矩阵分解的数学问题,如稀疏运算的返回类型,矩阵填充和重新排序。八度的稀疏运算的实现相比,他们在Matlab中的等价物的基准,并讨论其影响。结果乘法和线性代数运算的各种矩阵的顺序和密度。此外,使用Octave的稀疏矩阵实现演示使用有限元模型(FEM)问题的一个真实的例子。最后讨论了在Octave的oct文件中使用稀疏矩阵的方法。讨论了在oct文件中创建、使用和返回稀疏矩阵的方法,以及Octave的Sparse和Array类之间的差异。

英文摘要:

There are many classes of mathematical problems which give rise to matrices, where a large number of the elements are zero. In this case it makes sense to have a special matrix type to handle this class of problems where only the non-zero elements of the matrix are stored. Not only does this reduce the amount of memory to store the matrix, but it also means that operations on this type of matrix can take advantage of the a-priori knowledge of the positions of the non-zero elements to accelerate their calculations. A matrix type that stores only the non-zero elements is generally called sparse. Until recently Octave has lacked a full implementation of sparse matrices. This article address the implementation of sparse matrices within Octave, including their storage, creation, fundamental algorithms used, their implementations and the basic operations and functions implemented for sparse matrices. Mathematical issues such as the return types of sparse operations, matrix fill-in and reordering for sparse matrix factorization is discussed in the context of a real example. Benchmarking of Octave's implementation of sparse operations compared to their equivalent in Matlab are given and their implications discussed. Results are presented for multiplication and linear algebra operations for various matrix orders and densities. Furthermore, the use of Octave's sparse matrix implementation is demonstrated using a real example of a finite element model (FEM) problem. Finally, the method of using sparse matrices with Octave's oct-files is discussed. The means of creating, using and returning sparse matrices within oct-files is discussed as well as the differences between Octave's Sparse and Array classes.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑