Visual Studio 2008 中的 clapack.h 或模板数值工具包

发布于 2024-11-19 16:40:28 字数 311 浏览 5 评论 0原文

我想使用 lapack 库 clapck,但是如何在 Visual Studio 2008 中使用它,在一个 C++ 项目中...

我还在审查 模板数值工具包

你做了什么吗类似,你做什么推荐与 Visual Studio C++ 项目一起使用吗? 您可以发布一个简单的示例,其中包含必须包含的标题吗?

I want to use the lapack library clapck, but how could I use it in Visual Studio 2008, in a C++ project...

Also I was reviewing Template Numerical Toolkit

Have you done something similar, what do you recommend to use with Visual Studio C++ project?
Can you post a simple example with the headers that must be included?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

握住我的手 2024-11-26 16:40:28
TNT is easy enough.

    #include "cmat.h"
    #include "lu.h"
    /*******************************
     * PURPOSE: Solves a linear equation in the form of Ax = b.
     *****/
    using namespace TNT;
    void matrix_solve(double V[9], double xb[3])
    {
      Matrix<double> A(3, 3, V);
      Vector<int> ipiv(3);
      Vector<double> b(3, xb);
      LU_factor(A, ipiv);
      LU_solve(A, ipiv, b);
      xb[0] = b[0];
      xb[1] = b[1];
      xb[2] = b[2];
    }
TNT is easy enough.

    #include "cmat.h"
    #include "lu.h"
    /*******************************
     * PURPOSE: Solves a linear equation in the form of Ax = b.
     *****/
    using namespace TNT;
    void matrix_solve(double V[9], double xb[3])
    {
      Matrix<double> A(3, 3, V);
      Vector<int> ipiv(3);
      Vector<double> b(3, xb);
      LU_factor(A, ipiv);
      LU_solve(A, ipiv, b);
      xb[0] = b[0];
      xb[1] = b[1];
      xb[2] = b[2];
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文