The GNU 科学图书馆 http://www.gnu.org/software/gsl/是用C编写的GPL软件。因此,它具有类似C的分配和编程方式(指针等)。随着GSLwrap http://gslwrap.sourceforge.net/,您可以采用 C++ 编程方式,同时仍然使用 GSL。 GSL 有一个BLAS http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms实施,但你可以使用ATLAS http://math-atlas.sourceforge.net/如果您想要更多性能,请代替默认的 CBLAS。
The 升压/uBLAS http://www.boost.org/doc/libs/1_49_0/libs/numeric/ublas/doc/index.htm库是一个 BSL 库,用 C++ 编写并作为 boost 包分发。它是实现 BLAS 标准的 C++ 方式。 uBLAS 附带了一些线性代数函数,并且有一个与 ATLAS 的实验结合 http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Linear_Algebra_With_UBLAS.
eigen http://eigen.tuxfamily.org是一个用 C++ 编写的线性代数库,根据 MPL2 许可证(从版本 3.1.1 开始)或 LGPL3/GPL2(旧版本)分发。它是一种 C++ 编程方式,但比其他两种方式集成度更高(有更多算法和数据结构可用)。本征声称更快 http://eigen.tuxfamily.org/index.php?title=FAQ#How_does_Eigen_compare_to_BLAS.2FLAPACK.3F与上面的 BLAS 实现相比,但不遵循事实上的标准 BLAS API。 Eigen似乎并没有在并行实现上投入很多精力。
犰狳 http://arma.sourceforge.net/是用于 C++ 的 LGPL3 库。它有绑定LAPACK http://www.netlib.org/lapack/(numpy 使用的库)。它使用递归模板和模板元编程,这是一个好点(我不知道其他库是否也在这样做?)。
xtensor https://github.com/QuantStack/xtensor是一个 BSD 许可的 C++ 库。它提供了与 NumPy 非常相似的 C++ API。看https://xtensor.readthedocs.io/en/latest/numpy.html https://xtensor.readthedocs.io/en/latest/numpy.html备忘单。