<tfoot id='H0M3k'></tfoot>

      <legend id='H0M3k'><style id='H0M3k'><dir id='H0M3k'><q id='H0M3k'></q></dir></style></legend>

      <i id='H0M3k'><tr id='H0M3k'><dt id='H0M3k'><q id='H0M3k'><span id='H0M3k'><b id='H0M3k'><form id='H0M3k'><ins id='H0M3k'></ins><ul id='H0M3k'></ul><sub id='H0M3k'></sub></form><legend id='H0M3k'></legend><bdo id='H0M3k'><pre id='H0M3k'><center id='H0M3k'></center></pre></bdo></b><th id='H0M3k'></th></span></q></dt></tr></i><div id='H0M3k'><tfoot id='H0M3k'></tfoot><dl id='H0M3k'><fieldset id='H0M3k'></fieldset></dl></div>
    1. <small id='H0M3k'></small><noframes id='H0M3k'>

        • <bdo id='H0M3k'></bdo><ul id='H0M3k'></ul>

        稀疏酉矩阵的最佳 C++ 矩阵库

        时间:2023-09-18

        <small id='COd7z'></small><noframes id='COd7z'>

        <i id='COd7z'><tr id='COd7z'><dt id='COd7z'><q id='COd7z'><span id='COd7z'><b id='COd7z'><form id='COd7z'><ins id='COd7z'></ins><ul id='COd7z'></ul><sub id='COd7z'></sub></form><legend id='COd7z'></legend><bdo id='COd7z'><pre id='COd7z'><center id='COd7z'></center></pre></bdo></b><th id='COd7z'></th></span></q></dt></tr></i><div id='COd7z'><tfoot id='COd7z'></tfoot><dl id='COd7z'><fieldset id='COd7z'></fieldset></dl></div>

              <tbody id='COd7z'></tbody>
              • <bdo id='COd7z'></bdo><ul id='COd7z'></ul>
                1. <tfoot id='COd7z'></tfoot>

                  <legend id='COd7z'><style id='COd7z'><dir id='COd7z'><q id='COd7z'></q></dir></style></legend>
                  本文介绍了稀疏酉矩阵的最佳 C++ 矩阵库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在寻找一个好的(在积极维护的最好情况下)C++ 矩阵库.因此它应该被模板化,因为我想使用有理数的复数作为数值类型.我处理的矩阵主要是稀疏和幺正的.

                  I am looking for a good (in the best case actively maintained) C++ matrix library. Thereby it should be templated, because I want to use a complex of rationals as numerical type. The matrices what I am dealing with are mainly sparse and unitary.

                  能否请您推荐一些库并简要解释一下为什么要使用它们,因为我知道如何找到它们,但我无法真正决定什么适合我,因为我缺少使用它们的经验.

                  Can you please suggest libraries and also give a small explaination why to use them, because I know how to find them, but I cannot really decide what is suitable for me because I am missing the experience with them.

                  我处理的主要运算是矩阵乘法向量的标量乘法克罗内克积.矩阵的大小是指数级的,我希望至少能够处理多达 1024x1024 个条目的矩阵.

                  The main operations I am dealing with are matrix multiplication, scalar multiplication with a vector and kronecker product. The size of the matrices is exponential and I wanna at least be able to deal with matrices up to 1024x1024 entries.

                  推荐答案

                  很多人在做严肃"矩阵的事情,依赖 BLAS,添加 LAPACK/ATLAS(正态矩阵)或 UMFPACK(稀疏矩阵)用于更高级的数学.原因是此代码经过充分测试、稳定、可靠且速度相当快.此外,您可以直接从供应商处购买它们(例如 Intel MKL)调整到您的架构,但也可以免费获得它们.uBLAS在Manuel 的答案 可能是标准的 C++ BLAS 实现.如果您稍后需要类似 LAPACK 的东西,可以使用绑定来实现.

                  Many people doing "serious" matrix stuff, rely on BLAS, adding LAPACK / ATLAS (normal matrices) or UMFPACK (sparse matrices) for more advanced math. The reason is that this code is well-tested, stable, reliable, and quite fast. Furthermore, you can buy them directly from a vendor (e.g. Intel MKL) tuned towards your architecture, but also get them for free. uBLAS mentioned in Manuel's answer is probably the standard C++ BLAS implementation. And if you need something like LAPACK later on, there are bindings to do so.

                  然而,这些标准库(BLAS/LAPACK/ATLAS 或 uBLAS + bindings + LAPACK/ATLAS)都无法满足模板化和易于使用的要求(除非您只需要 uBLAS).实际上,我必须承认,当我使用 BLAS/LAPACK 实现时,我倾向于直接调用 C/Fortran 接口,因为我通常看不到 uBLAS + 绑定组合的太多额外优势.

                  However, none of these standard libraries (BLAS / LAPACK / ATLAS or uBLAS + bindings + LAPACK / ATLAS) ticks your box for being templated and easy to use (unless uBLAS is all you'll ever need). Actually, I must admit, that I tend to call the C / Fortran interface directly when I use a BLAS / LAPACK implementation, since I often don't see much additional advantage in the uBLAS + bindings combination.

                  如果我需要一个简单易用的通用 C++ 矩阵库,我倾向于使用 Eigen(我过去使用 NewMat).优点:

                  If I a need a simple-to-use, general-purpose C++ matrix library, I tend to use Eigen (I used to use NewMat in the past). Advantages:

                  • 在英特尔架构上相当快,对于较小的矩阵可能是最快的
                  • 漂亮的界面
                  • 几乎满足您对矩阵库的所有期望
                  • 您可以轻松添加新类型

                  缺点(国际海事组织):

                  Disadvantages (IMO):

                  • 单处理器 [在 Eigen 中部分修复3.0]
                  • 对于较大的矩阵和一些高级数学比 ATLAS 或 Intel MKL(例如 LU 分解)更慢[在 Eigen 3.0 中也有所改进]
                  • 仅对稀疏矩阵提供实验性支持[在即将发布的 3.1 版中得到改进].
                  • single-processor [ partly fixed in Eigen 3.0]
                  • slower for larger matrices and some advanced math than ATLAS or Intel MKL (e.g. LU decomposition) [ also improved in Eigen 3.0]
                  • only experimental support for sparse matrices [ improved in upcoming version 3.1].

                  即将推出的 Eigen 3.1 允许某些功能使用英特尔 MKL(或任何其他 BLAS/LAPACK 实现).

                  The upcoming Eigen 3.1 allows some functions to use the Intel MKL (or any other BLAS / LAPACK implementation).

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

                  上一篇:简单的 3x3 矩阵逆代码 (C++) 下一篇:从 OpenCV 中的旋转图像旋转回点

                  相关文章

                  最新文章

                2. <small id='XoDDW'></small><noframes id='XoDDW'>

                  • <bdo id='XoDDW'></bdo><ul id='XoDDW'></ul>
                3. <tfoot id='XoDDW'></tfoot>
                  <i id='XoDDW'><tr id='XoDDW'><dt id='XoDDW'><q id='XoDDW'><span id='XoDDW'><b id='XoDDW'><form id='XoDDW'><ins id='XoDDW'></ins><ul id='XoDDW'></ul><sub id='XoDDW'></sub></form><legend id='XoDDW'></legend><bdo id='XoDDW'><pre id='XoDDW'><center id='XoDDW'></center></pre></bdo></b><th id='XoDDW'></th></span></q></dt></tr></i><div id='XoDDW'><tfoot id='XoDDW'></tfoot><dl id='XoDDW'><fieldset id='XoDDW'></fieldset></dl></div>

                  1. <legend id='XoDDW'><style id='XoDDW'><dir id='XoDDW'><q id='XoDDW'></q></dir></style></legend>