2

我正在寻找一个可以进行大多数矩阵/向量运算的免费包。我可以自己编写一些基本函数,但对于计算特征值和特征向量等高级函数,我更喜欢健壮的代码,我想知道这些包是否可以免费获得。如果我理解正确的话,Ada 2005 有更多的矩阵运算工具,但它具有计算对称矩阵和厄米特矩阵的特征值的功能。我需要一个更通用的包来处理任何类型的矩阵。

来自 Drexel Fusion Laboratory 的 Ada95 矩阵包(54KB tar.gz 文件)有链接:http ://dflwww.ece.drexel.edu/research/ada/ ,但这种墨水的页面今天不存在。

非常感谢...

4

3 回答 3

3

我认为您所说的 Ada95 包在这里——但它只有 35k,而且它的功能似乎比 Ada2005 标准库少。

不知道这个Ada95 绑定到 BLAS是如何进入我的浏览器缓存的!我看到对于一般矩阵求解,您也需要 LAPACK,我想知道 GNAT 中已有的绑定是否会有所帮助?打包System.Generic_Real_LAPACK在文件 s-gerela.ad[bs] 中。评论说

--  LAPACK Computational Routines

--  gerfs  Refines the solution of a system of linear equations with
--         a general matrix and estimates its error
--  getrf  Computes LU factorization of a general m-by-n matrix
--  getri  Computes inverse of an LU-factored general matrix
--         square matrix, with multiple right-hand sides
--  getrs  Solves a system of linear equations with an LU-factored
--         square matrix, with multiple right-hand sides
--  orgtr  Generates the Float orthogonal matrix Q determined by sytrd
--  steqr  Computes all eigenvalues and eigenvectors of a symmetric or
--         Hermitian matrix reduced to tridiagonal form (QR algorithm)
--  sterf  Computes all eigenvalues of a Float symmetric
--         tridiagonal matrix using QR algorithm
--  sytrd  Reduces a Float symmetric matrix to tridiagonal form

我怀疑这是完整库的一小部分。尽管如此,它仍然可以作为更广泛绑定的有用跳板。

于 2010-07-07T12:39:40.137 回答
2

正如 John Barnes Rationale for Ada 2005中所建议的那样,Ada 的附录 G:Numerics并非旨在“替代诸如著名的 BLAS 之类的专业库”,但没有什么可以阻止在内部使用 BLAS 的实现。作为一个具体的例子,GNAT 编译器使用 BLAS 和 LAPACK实现了G.3.1 实向量和矩阵以及G.3.2 复向量和矩阵。要查看详细信息,您可以检查相关的包体:

$ export ADA_INC = /your/path/to/adinclude
$ view $ADA_INC/$(gnatkr Ada.Numerics.Generic_Real_Arrays.adb)
$ view $ADA_INC/$(gnatkr Ada.Numerics.Generic_Complex_Arrays.adb)
于 2010-07-08T04:26:17.020 回答
1

先前提供此软件包的站点已迁移,旧内容现在可在以下位置获取:

http://dfl.ece.drexel.edu/content/ada95-matrix-package

于 2013-02-24T22:26:58.833 回答